[go: up one dir, main page]

JPH0746376B2 - IC card - Google Patents

IC card

Info

Publication number
JPH0746376B2
JPH0746376B2 JP61292763A JP29276386A JPH0746376B2 JP H0746376 B2 JPH0746376 B2 JP H0746376B2 JP 61292763 A JP61292763 A JP 61292763A JP 29276386 A JP29276386 A JP 29276386A JP H0746376 B2 JPH0746376 B2 JP H0746376B2
Authority
JP
Japan
Prior art keywords
data
word
area
memory
writing
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
JP61292763A
Other languages
Japanese (ja)
Other versions
JPS63145582A (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.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP61292763A priority Critical patent/JPH0746376B2/en
Publication of JPS63145582A publication Critical patent/JPS63145582A/en
Publication of JPH0746376B2 publication Critical patent/JPH0746376B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、内蔵するデータメモリに対してデータを記憶
するICカードに関する。
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Field of Industrial Application) The present invention relates to an IC card for storing data in a built-in data memory.

(従来の技術) 最近、新たな携帯可能なデータ記憶媒体として、不揮発
性のデータメモリおよびCPUなどの制御素子を有するIC
チップを内蔵したICカードが開示されている。この種の
ICカードは、内部の制御素子あるいは外部装置により内
蔵するデータメモリに対してデータの記憶、読出し、消
去を行なうようになっている。
(Prior Art) Recently, as a new portable data storage medium, an IC having a nonvolatile data memory and a control element such as a CPU
An IC card with a built-in chip is disclosed. Of this kind
The IC card stores, reads, and erases data in a data memory incorporated by an internal control element or an external device.

従来、このようなICカードにおいて、データメモリに対
するデータの記憶方式として、記憶しようとする一単位
のデータをある固定長で分割して記憶する方式が考えら
れている。この場合、一単位のデータごとにその格納情
報としてのレコード番号というものを付加して記憶す
る。そして、こうして記憶したデータをアクセスする場
合、各データごとに付加されたレコード番号を順番に検
索してゆくことにより、目的とするレコード番号を探し
出し、対応するデータを読出すものである。
Conventionally, in such an IC card, as a method for storing data in a data memory, a method has been considered in which one unit of data to be stored is divided and stored with a certain fixed length. In this case, a record number as the storage information is added to each unit of data and stored. When the data stored in this way is accessed, the record number added to each data is searched in order to find the target record number and read the corresponding data.

しかしながら、このようなデータ記憶方式では、各デー
タごとにその格納情報としてのレコード番号が必要であ
り、このためメモリエリアが有効に使えず、メモリ効率
が低下してしまうという問題があった。また、記憶され
たデータをアクセスする場合、レコード番号を順番に検
索する必要があり、このためアクセス時間が長くなって
しまうという問題があった。
However, in such a data storage system, a record number is required as storage information for each data, so that there is a problem that the memory area cannot be effectively used and the memory efficiency is reduced. Further, when accessing the stored data, it is necessary to search the record numbers in order, which causes a problem that the access time becomes long.

(発明が解決しようとする問題点) 上記したように、従来のICカードでは、メモリエリアが
有効に使えず、メモリ効率が低下してしまうという問題
があり、また記憶されたデータのアクセス時、アクセス
時間が長くなってしまうという問題がある。
(Problems to be Solved by the Invention) As described above, in the conventional IC card, there is a problem that the memory area cannot be effectively used and the memory efficiency is lowered. Moreover, when accessing the stored data, There is a problem that access time becomes long.

そこで、本発明は以上の問題点を解決するもので、メモ
リエリアが有効に使え、メモリ効率が向上するととも
に、記憶されたデータのアクセス時、アクセス時間の迅
速化が図れるICカードを提供することを目的とする。
Therefore, the present invention solves the above problems, and provides an IC card in which a memory area can be effectively used, memory efficiency is improved, and access time of stored data can be shortened. With the goal.

[発明の構成] (問題点を解決するための手段) 本発明は、外部装置から受信したデータを内蔵するメモ
リに対して所定のワード単位で書込むICカードであっ
て、前記メモリ内におけるワードの長さ情報を記憶する
ワード長記憶手段と、前記外部装置から受信したデータ
を前記ワード長記憶手段に記憶されたワードの長さ情報
に基づいて固定長で分割する分割手段と、この分割手段
で分割された先頭のデータを前記メモリの記憶領域の一
端のワード領域に書込む第1の書込手段と、前記先頭の
データ以降に継続する分割されたデータは前記メモリの
記憶領域の他端のワード領域から順次書込む第2の書込
手段と、前記第1の書込手段および第2の書込手段によ
ってデータを書込んだ際に該データに継続するデータが
存在するか否かを判定する判定手段と、この判定手段で
該データに継続するデータが存在しないと判定された場
合は該データに終了を示すデータを該ワード領域に書込
む第3の書込手段と、前記判定手段で該データに継続す
るデータが存在すると判定された場合は該データに継続
するワード領域の位置情報を該ワード領域に書込む第4
の書込手段とを具備している。
[Structure of the Invention] (Means for Solving Problems) The present invention is an IC card for writing data received from an external device in a predetermined word unit to a built-in memory, wherein the word in the memory is used. Length storing means for storing the length information of the above, a dividing means for dividing the data received from the external device into fixed lengths based on the word length information stored in the word length storing means, and this dividing means. First writing means for writing the head data divided by the above into a word area at one end of the memory area, and the divided data continuing after the head data is the other end of the memory area of the memory. Second writing means for sequentially writing from the word area and whether or not there is continuous data in the data when the data is written by the first writing means and the second writing means. judge The determining means, a third writing means for writing the data indicating the end of the data to the word area when the determining means determines that there is no continuous data, and the determining means If it is determined that there is continuous data in the data, the position information of the word area continuing in the data is written in the word area.
Writing means.

(作用) 分割された先頭データの記憶順にレコード番号とし、こ
のレコード番号と上記固定長とにより先頭データの記憶
位置が認識できる。そして、先頭データ以降に継続する
分割されたデータの記憶位置は、先頭データに付加され
ている記憶位置情報により認識できる。したがって、従
来のように各データごとにレコード番号を付加する必要
がなくなり、メモリエリアが有効に使えるとともに、メ
モリ効率が向上する。また、記憶されたデータを読出す
際、レコード番号を入力することにより、データに直接
アクセスできるので、従来のようにレコード番号を順番
に検索する方式に比べてアクセス時間が著しく速くな
る。
(Operation) The record number is set in the storage order of the divided head data, and the storage position of the head data can be recognized by this record number and the fixed length. Then, the storage position of the divided data continuing after the head data can be recognized by the storage position information added to the head data. Therefore, it is not necessary to add a record number to each data as in the conventional case, the memory area can be effectively used, and the memory efficiency is improved. Further, since the data can be directly accessed by inputting the record number when reading the stored data, the access time becomes significantly faster than the conventional method of sequentially searching the record numbers.

(実施例) 以下、本発明の一実施例について図面を参照して説明す
る。
(Example) Hereinafter, one example of the present invention will be described with reference to the drawings.

第18図は本発明に係るICカード適用される、たとえばホ
ームバンキングシステムあるいはショッピングシステム
などの端末装置として用いられるカード取扱装置の構成
例を示すものである。すなわち、この装置は、ICカード
1をカードリーダ・ライタ2を介してCPUなどからなる
制御部3と接続可能にするとともに、制御部3にキーボ
ード4、CRTディスプレイ装置5、プリンタ6およびフ
ロッピィディスク装置7を接続して構成される。
FIG. 18 shows an example of the configuration of a card handling device to which the IC card according to the present invention is applied, which is used as a terminal device such as a home banking system or a shopping system. That is, this device enables the IC card 1 to be connected to a control unit 3 including a CPU via a card reader / writer 2, and the control unit 3 includes a keyboard 4, a CRT display device 5, a printer 6, and a floppy disk device. 7 are connected.

ICカード1は、ユーザが保持し、たとえば商品購入など
の際にユーザのみが知得している暗証番号の参照や必要
データの蓄積などを行なうもので、第16図にその機能ブ
ロックを示すように、リード・ライト部11、暗証設定・
暗証照合部12、および暗号化・複合化部13などの基本機
能を実行する部分と、これらの基本機能を管理するスー
パバイザ14とで構成されている。リード・ライト部11
は、カードリーダ・ライタ2との間でデータを読出し、
書込み、あるいは消去を行なう機能である。暗証設定・
暗証照合部12は、ユーザが設定した暗証番号の記憶およ
び読出禁止処理を行なうとともに、暗証番号の設定後に
その暗証番号の照合を行ない、以後の処理の許可を与え
る機能である。暗号化・複合化部13は、たとえば通信回
線を介して制御部3から他の端末装置へデータを送信す
る場合の通信データの漏洩、偽造を防止するための暗号
化や暗号化されたデータの複合化を行なうものであり、
たとえばDES(Data Encryption Standard)など、十
分な暗号強度を有する暗号化アルゴリズムにしたがって
データ処理を行なう機能である。スーパバイザ14は、カ
ードリーダ・ライタ2から入力された機能コードもしく
はデータの付加された機能コードを解読し、前記基本機
能のうち必要な機能を選択して実行させる機能である。
The IC card 1 is held by the user, and refers to a personal identification number known only to the user when the product is purchased, for example, and stores necessary data. As shown in FIG. 16, its functional block is shown. In addition, read / write section 11, password setting
The password collation unit 12 and the encryption / decryption unit 13 perform basic functions, and the supervisor 14 manages these basic functions. Read / write part 11
Reads data from / to the card reader / writer 2,
It is a function of writing or erasing. PIN code setting
The personal identification collation unit 12 has a function of performing storage and reading prohibition processing of the personal identification number set by the user, performing collation of the personal identification number after setting the personal identification number, and permitting subsequent processing. The encryption / decryption unit 13 encrypts or prevents encrypted data from being leaked or forged when transmitting data from the control unit 3 to another terminal device via a communication line, for example. Is for compounding,
For example, it is a function of performing data processing in accordance with an encryption algorithm having sufficient encryption strength such as DES (Data Encryption Standard). The supervisor 14 is a function that decodes the function code or the function code added with data input from the card reader / writer 2, and selects and executes a necessary function from the basic functions.

これらの諸機能を発揮させるために、ICカード1は例え
ば第15図に示すように、制御部としての制御素子(たと
えばCPU)15、データメモリ部としての記憶内容が消去
可能な不揮発性のデータメモリ16、プログラムメモリ部
としてのプログラムメモリ17、およびカードリーダ・ラ
イタ2との電気的接触を得るためのコンタクト部18によ
って構成されており、これらのうち破線内の部分(制御
素子15、データメモリ16、プログラムメモリ17)は1つ
のICチップで構成されている。プログラムメモリ17は、
たとえばマスクROMで構成されており、前記各基本機能
を実現するサブルーチンを備えた制御素子15の制御プロ
グラムを記憶するものである。データメモリ16は各種デ
ータの記憶に使用され、たとえばEEPROMで構成されてい
る。
In order to exert these various functions, the IC card 1 has, for example, as shown in FIG. 15, a control element (for example, CPU) 15 as a control unit, and nonvolatile data in which the stored contents as a data memory unit can be erased. It comprises a memory 16, a program memory 17 as a program memory section, and a contact section 18 for making electrical contact with the card reader / writer 2. Of these, a portion within a broken line (control element 15, data memory) 16, the program memory 17) is composed of one IC chip. The program memory 17
For example, it is composed of a mask ROM and stores a control program of the control element 15 having a subroutine for realizing each of the basic functions. The data memory 16 is used to store various data and is composed of, for example, an EEPROM.

データメモリ16は、たとえば第2図に示すように複数の
エリアに分割されていて、それぞれのエリアにはエリア
番号[00〜FF]が与えられている。このうち、エリア
[00]には、全エリアのそれぞれの先頭アドレス、エリ
アを構成しているバイト数、およびエリアを分割してい
る固定長がエリア番号に対応して記憶されている。たと
えば、エリア[02]の先頭アドレスはA02番地、エリア
を構成しているバイト数はS02バイト、エリアを分割し
ている固定長がL02バイトであるといったように対応す
る。
The data memory 16 is divided into a plurality of areas, for example, as shown in FIG. 2, and area numbers [00 to FF] are given to the respective areas. Among these, in the area [00], the respective start addresses of all areas, the number of bytes forming the area, and the fixed length dividing the area are stored in correspondence with the area number. For example, the start address of area [02] is address A 02 , the number of bytes making up the area is S 02 bytes, and the fixed length dividing the area is L 02 bytes.

カードリーダ・ライタ2は、ICカード1と制御部3との
間で機能コードやデータの授受を行なうものである。具
体的には、第17図に示すように、図示しないカード挿入
口に挿入されたICカード1を所定の位置まで搬送する搬
送機構21、所定の位置にセットされたICカード1のコン
タクト部18に電気的に接触されるコンタクト部22、全体
の制御を司るCPUなどからなる制御回路23、制御回路23
と制御部3との間で命令データや応答データの授受を行
なうための入出力インタフェイス回路24、およびデータ
を記憶するデータメモリ25などから構成されている。
The card reader / writer 2 exchanges function codes and data between the IC card 1 and the control unit 3. Specifically, as shown in FIG. 17, a transport mechanism 21 for transporting the IC card 1 inserted in a card insertion slot (not shown) to a predetermined position, and a contact portion 18 of the IC card 1 set at the predetermined position. A contact portion 22 that is electrically contacted with a control circuit 23 including a CPU that controls the entire control
The control unit 3 includes an input / output interface circuit 24 for transmitting and receiving command data and response data, a data memory 25 for storing data, and the like.

次に、このような構成において本発明のデータ記憶方式
について詳細に説明する。まず、最初にICカード1のデ
ータメモリ16のエリア体系を第3図に示す。データ記憶
エリア[00〜FF]はディレクトリ[00]によって各エリ
アに分割される。分割された各エリアは、ディレクトリ
によってある固定長(Lバイト)を持つワードで分割さ
れる。この各ワードに付与されるワード番号は、どこか
に記憶されているのではなく、検索するごとに最上(ま
たは最下)ワードから数える。
Next, the data storage system of the present invention having such a configuration will be described in detail. First, the area system of the data memory 16 of the IC card 1 is shown in FIG. The data storage area [00 to FF] is divided into areas by the directory [00]. Each divided area is divided into words having a fixed length (L bytes) depending on the directory. The word number given to each word is not stored anywhere but is counted from the top (or bottom) word each time it is searched.

データメモリ16にデータを書込む(記憶する)際には、
第4図に示すようなフォーマットを持つ書込み命令デー
タを入力する。この書込み命令データは、書込み機能コ
ード、エリア番号、データの長さを示すバイト数情報
(LNG)、および記憶データから構成される。
When writing (storing) data in the data memory 16,
Write command data having a format as shown in FIG. 4 is input. This write command data is composed of a write function code, an area number, byte number information (LNG) indicating the length of data, and storage data.

記憶データは、あらかじめ定められた固定長で分割され
る。そして、分割されてワード体系となった様子を第5
図に示す。第5図で示すように、ワード体系はコントロ
ールブロック(Control Block)、それ以降継続する分
割されたデータの記憶位置情報としてのチェインナンバ
(Chain Number)、および分割データから構成され
る。
The stored data is divided into a predetermined fixed length. And the state that it was divided into a word system is the fifth
Shown in the figure. As shown in FIG. 5, the word system is composed of a control block (Control Block), a chain number (Chain Number) as storage location information of the divided data continuing thereafter, and the divided data.

コントロールブロックは、それ以下のデータの保証およ
び正確を示すものであり、第6図に示すようにバリッド
フラグ(Valld Flag)、デリートフラグ(Delete Fla
g)、およびファーストフラグ(First Flag)から構成
される。バリッドフラグは、このフラグのあるワードに
データを書込む際、正しく書込まれたか否か、読出せる
状態にあるか否かを判断するためのものである。デリー
トフラグは、そのワードが存在しており、データを読出
可能であるか否かを示す。ファーストフラグは、そのワ
ード内のデータが分割する前のデータのLNGを含むワー
ド(ディレクトリワード;Directry Ward)であるか、
その他のワード(フォローワード;Follow Ward)であ
るかを示す。
The control block indicates the guarantee and accuracy of the data below it. As shown in FIG. 6, the valid flag (Delete flag) and the delete flag (Delete Fla
g) and a first flag. The valid flag is for determining whether or not data has been written correctly and is in a readable state when writing data to a word having this flag. The delete flag indicates whether the word exists and data can be read. The first flag is a word (directory word; Directy Ward) that contains the LNG of the data before the data in that word is divided, or
Indicates whether it is another word (follow word; Follow Ward).

チェインナンバは、そのワードの次に繋がるべきデータ
が収納されているワードのワード番号が収納される。な
お、特に1ワードで表現できるデータや最終ワードの場
合、特定のキャラクタを入れることによって判断する。
The chain number stores the word number of the word in which the data to be connected next to that word is stored. In particular, in the case of data that can be expressed by one word or the last word, it is determined by inserting a specific character.

第7図に記憶データをLバイト固定長で分割した様子を
示し、第8図にその各分割データにコントロールブロッ
ク(CB)およびチェインナンバ(CN)を付加してワード
化した様子を示し、第9図にあるエリアに第8図で示し
たものを記憶した様子を示す。第9図で示すように、分
割データの先頭(ディレクトリワード)をエリアの上か
ら記憶し、それに継続する分割データ(フォローワー
ド)はエリアの下から記憶する。
FIG. 7 shows a state in which the stored data is divided into fixed lengths of L bytes, and FIG. 8 shows a state in which a control block (CB) and a chain number (CN) are added to each of the divided data to form words. The area shown in FIG. 9 is stored in the area shown in FIG. As shown in FIG. 9, the head (directory word) of the divided data is stored from above the area, and the divided data (follow word) following it is stored from below the area.

以下、データメモリ16に対するデータの書込み(記憶)
処理について第1図に示すフローチャートを参照して説
明する。まず、定常状態では、カードリーダ・ライタ2
からの命令データ待ち状態となっており、このときカー
ドリーダ・ライタ2から命令データが入力されると、制
御素子15はまず命令データに含まれる機能コードが書込
み機能コードであるか否かを確認する。書込み機能コー
ドであれば、制御素子15は命令データに付加されている
エリア番号をデータメモリ16のエリア「00」から探し出
す。見つがらなければ、制御素子15はエリア未確認を意
味する応答データを出力し、命令データ待ち状態に戻
る。見つかれば、制御素子15はそれに対応したエリアの
先頭アドレス、エリアを構成しているバイト数、および
エリアを分割している固定長を内蔵するRAMに保持し、
対象エリアの位置を認識する。次に、制御素子15は、命
令データに付加されている記憶データをエリアの固定長
Lからコントロールブロック(CB)とチェインナンバ
(CN)との和を引いた長さ(バイト)で先頭から分割
し、この分割データを内蔵するRAMに保持する。
Below, writing (storing) data to the data memory 16
The processing will be described with reference to the flowchart shown in FIG. First, in the steady state, the card reader / writer 2
When the command data is input from the card reader / writer 2 at this time, the control element 15 first confirms whether the function code included in the command data is the write function code. To do. If it is the write function code, the control element 15 searches the area "00" of the data memory 16 for the area number added to the instruction data. If not found, the control element 15 outputs the response data indicating that the area has not been confirmed, and returns to the command data waiting state. If found, the control element 15 holds the start address of the corresponding area, the number of bytes forming the area, and the fixed length dividing the area in the built-in RAM,
Recognize the position of the target area. Next, the control element 15 divides the storage data added to the instruction data from the beginning with a length (byte) obtained by subtracting the sum of the control block (CB) and the chain number (CN) from the fixed length L of the area. Then, the divided data is held in the built-in RAM.

次に、制御素子15は、ポインタデータがディレクトリワ
ードを新規に書込むワードを示しているか否かを判断す
る。これにより、正当性が確認されなければ、制御素子
15はポインタデータエラーを意味する応答データを出力
し、命令データ待ち状態に戻る。正当性が確認される
と、制御素子15は命令データに付加されているバイト数
情報により実際に書込むべきバイト数を算出し、その分
だけデータ記憶用エリアが確保されているか否かの判断
を行なう。確保されていなければ、制御素子15は入力デ
ータバイト数エラーを意味する応答データを出力し、命
令データ待ち状態に戻る。確保されていれば、制御素子
15は上記ポインタデータによりRAMに記憶されている分
割されたデータの先頭データ(ディレクトリワード)に
コントロールブロックおよびチェインナンバ(チェイン
ナンバの実際の書込みは後で行なう)を付加し、エリア
に書込む。そして、制御素子15はコントロールブロック
のファーストフラグを「0」に設定する。
Next, the control element 15 determines whether or not the pointer data points to a word for newly writing the directory word. This ensures that the control element is
Reference numeral 15 outputs response data indicating a pointer data error, and returns to the instruction data waiting state. When the validity is confirmed, the control element 15 calculates the number of bytes to be actually written by the number-of-bytes information added to the instruction data, and judges whether or not the data storage area is secured accordingly. Do. If not secured, the control element 15 outputs response data indicating an error in the number of input data bytes and returns to the instruction data waiting state. If secured, control element
Reference numeral 15 adds a control block and a chain number (actual writing of the chain number will be performed later) to the head data (directory word) of the divided data stored in the RAM by the pointer data, and writes it in the area. Then, the control element 15 sets the first flag of the control block to "0".

次に、制御素子15は、ディレクトリワードに続くデータ
(フォローワード)があるか否かを判断する。フォロー
ワードがない場合、制御素子15は第1図中の以下の動
作となる。フォローワードがある場合、制御素子15はエ
リアの最終ワードから未書込みワードをサーチし、フォ
ローワードを書込む。そして、制御素子15は、いま書込
んだワードのワード番号をその前に書込んだワードのチ
ェインナンバに書込む。次に、制御素子15は、いま書込
んだワードに続くフォローワードがあるか否かを判断す
る。フォローワードがある場合、制御素子15は第1図の
以下の動作となる。フォローワードがない場合、制御
素子15はチェインナンバに例えば「END」という情報を
書込む。そして、制御素子15は書込んだ全てのワードの
コントロールブロックのバリッドフラグを「0」に設定
し、次にディレクトリワードの新規先頭ワードをポイン
タデータとして記憶する。そして、制御素子15は書込み
終了の応答データを出力し、命令データ待ち状態に戻
る。
Next, the control element 15 determines whether or not there is data (following word) following the directory word. When there is no follow word, the control element 15 operates as follows in FIG. If there is a follow word, the control element 15 searches the last word of the area for an unwritten word and writes the follow word. Then, the control element 15 writes the word number of the word just written into the chain number of the previously written word. Next, the control element 15 determines whether or not there is a follow word following the word just written. When there is a follow word, the control element 15 operates as shown in FIG. When there is no follow word, the control element 15 writes information such as “END” in the chain number. Then, the control element 15 sets the valid flags of the control blocks of all the written words to "0", and then stores the new leading word of the directory word as pointer data. Then, the control element 15 outputs the response data indicating the completion of writing and returns to the instruction data waiting state.

次に、データメモリ16に対するデータの読出処理につい
て第10図に示すフローチャートを参照して説明する。デ
ータメモリ16からデータを読出す際には、第11図に示す
ようなフォーマットを持つ読出し命令データを入力す
る。この読出し命令データは、読出し機能コード、エリ
ア番号およびレコード番号から構成されている。まず、
定常状態えは、カードリーダ・ライタ2からの命令デー
タ待ち状態となっており、このときカードリーダ・ライ
タ2から命令データが入力されると、制御素子15はまず
命令データに含まれる機能コードが読出し機能コードで
あるか否かを確認する。読出し機能コードであれば、制
御素子15は命令データに付加されているエリア番号をデ
ータメモリ16のエリア「00」から探し出す。見つがらな
ければ、制御素子15はエリア未確認を意味する応答デー
タを出力し、命令データ待ち状態に戻る。見つかれば、
制御素子15は命令データに付加されているレコード番号
を抽出する。そして、制御素子15は、エリアは固定長L
によって分割されているので、その固定長Lと上記抽出
したレコード番号との間で所定の演算(固定長L×レコ
ード番号)を行なうことにより、エリアの先頭からのワ
ード番号を算出し、そのワード番号で示されるワードの
データ(ディレクトリワード)を読出す。次に、制御素
子15は、この読出したデータ(先頭データ)のチェイン
ナンバを抽出し、そのチェインナンバが「END」を示す
情報であるか否かを判断する。「END」でない場合、制
御素子15はチェインナンバで示されたワード番号に対応
するワードのデータ(上記先頭データに継続するデー
タ)を読出し、第10図中の以下の動作となる。「EN
D」である場合、制御素子15は読出した全てのデータの
コントロールブロック(CB)およびチェインナンバ(C
N)を除いたデータを繋げて出力し、命令データ待ち状
態に戻る。なお、データの最終ワードは、ディレクトリ
ワードのLNGにより未書込みの部分が除かれる。
Next, the process of reading data from the data memory 16 will be described with reference to the flowchart shown in FIG. When reading data from the data memory 16, read instruction data having a format as shown in FIG. 11 is input. This read command data is composed of a read function code, an area number and a record number. First,
The steady state is in a state of waiting for command data from the card reader / writer 2, and when command data is input from the card reader / writer 2 at this time, the control element 15 first detects the function code included in the command data. Check if it is a read function code. If it is a read function code, the control element 15 searches the area "00" of the data memory 16 for the area number added to the instruction data. If not found, the control element 15 outputs the response data indicating that the area has not been confirmed, and returns to the command data waiting state. If found
The control element 15 extracts the record number added to the command data. The area of the control element 15 is fixed length L
Since it is divided by, the predetermined number (fixed length L × record number) is calculated between the fixed length L and the extracted record number to calculate the word number from the beginning of the area, and the word The data (directory word) of the word indicated by the number is read. Next, the control element 15 extracts the chain number of the read data (head data) and determines whether or not the chain number is information indicating "END". If it is not "END", the control element 15 reads the data of the word corresponding to the word number indicated by the chain number (data continuing from the above-mentioned head data), and the following operation in FIG. 10 is performed. "EN
If it is "D", the control element 15 indicates that the control block (CB) and the chain number (C
The data excluding N) is connected and output, and the operation returns to the instruction data wait state. Note that the last word of the data has the unwritten portion removed by the LNG of the directory word.

具体例として、たとえば第12図に示すような読出し命令
データが入力されたとする。この命令データは[02]と
いうエリア[02]というレコード番号のデータを読出す
ものであり、これは第13図中の斜線部のデータの読出す
ということである。第14図にその読出しデータを出力し
た様子を示す。
As a specific example, assume that read command data as shown in FIG. 12 is input. This command data is for reading the data of the record number [02] of the area [02], which means that the data of the shaded area in FIG. 13 is read. FIG. 14 shows how the read data is output.

このように、データメモリの分割された各エリアを固定
長を持つワードで分割するとともに、記憶するデータも
上記固定長で分割し、これら分割したデータ全てにこれ
以降継続する分割されたデータの記憶位置を示すワード
番号(チェインナンバ)を付加する。そして、分割した
先頭のデータをエリアの先頭ワード側から順に記憶し、
それ以降の継続する分割されたデータはエリアの最終ワ
ード側から順に記憶するものである。このようなデータ
記憶方式によれば、分割された先頭データの記憶順にレ
コード番号とし、このレコード番号と上記固定長とによ
り先頭データの記憶位置が認識できる。そして、先頭エ
ータ以降に継続する分割されたデータの記憶位置は、各
データに付加されているワード番号により認識できる。
したがって、従来のように各データごとにレコード番号
を付加する必要がなくなり、メモリエリアが有効に使え
るとともに、メモリ効率が向上する。また、記憶された
データを読出す際、レコード番号を入力することによ
り、データに直接アクセスできるので、従来のようにレ
コード番号を順番に検索する方式に比べてアクセス時間
が著しく速くなる。
In this way, each divided area of the data memory is divided into words having a fixed length, the data to be stored is also divided into the fixed length, and all the divided data are stored in the divided data that continues thereafter. A word number (chain number) indicating the position is added. Then, store the divided top data in order from the top word side of the area,
Subsequent divided data is stored sequentially from the last word side of the area. According to such a data storage system, the record number is set in the storage order of the divided head data, and the storage position of the head data can be recognized from this record number and the fixed length. The storage position of the divided data that continues after the first data can be recognized by the word number added to each data.
Therefore, it is not necessary to add a record number to each data as in the conventional case, the memory area can be effectively used, and the memory efficiency is improved. Further, since the data can be directly accessed by inputting the record number when reading the stored data, the access time becomes significantly faster than the conventional method of sequentially searching the record numbers.

なお、分割された先頭データに継続するデータは最終ワ
ード側から順に記憶されるので、その継続するデータに
は必ずしもそれ以降継続するデータの記憶位置情報を付
加しなくともよい。
Since the data continuing to the divided head data is stored in order from the last word side, it is not always necessary to add the storage position information of the data continuing after that to the continuing data.

[発明の効果] 以上詳述したように本発明によれば、メモリエリアが有
効に使え、メモリ効率が向上するとともに、記憶された
データのアクセス時、アクセス時間の迅速化が図れるIC
カードを提供できる。
[Advantages of the Invention] As described in detail above, according to the present invention, the memory area can be effectively used, the memory efficiency is improved, and the access time can be shortened when the stored data is accessed.
Cards can be provided.

【図面の簡単な説明】[Brief description of drawings]

図は本発明の一実施例を説明するためのもので、第1図
はデータの書込み処理を示すフローチャート、第2図は
データメモリの構成を示す図、第3図はデータメモリの
エリア体系をを示す図、第4図は書込み命令データのフ
ォーマットを示す図、第5図はデータが分割されてワー
ド体系となった様子を示す図、第6図はコントロールブ
ロックの構成を示す図、第7図はデータを固定長で分割
した様子を示す図、第8図は各分割データにコントロー
ルブロックとチェインナンバを付加してワード化した様
子を示す図、第9図はエリアにデータを記憶した様子を
示す図、第10図はデータの読出処理を示すフローチャー
ト、第11図は読出し命令データのフォーマットを示す
図、第12図は読出し命令データの具体例を示す図、第13
図はデータメモリ内の具体例を示す図、第14図は読出し
たデータの出力の具体例を示す図、第15図はICカードに
内蔵するICチップの構成を示すブロック図、第16図はIC
カードの機能ブロックを示す図、第17図はカードリーダ
・ライタの構成を示すブロック図、第18図はカード取扱
装置の構成を示すブロック図である。 1……ICカード、2……カードリーダ・ライタ、15……
制御素子、16……データメモリ(記憶媒体)、17……プ
ログラムメモリ。
FIG. 1 is a diagram for explaining one embodiment of the present invention. FIG. 1 is a flow chart showing a data writing process, FIG. 2 is a diagram showing a configuration of a data memory, and FIG. 3 is an area system of the data memory. FIG. 4, FIG. 4 is a diagram showing a format of write command data, FIG. 5 is a diagram showing how data is divided into a word system, and FIG. 6 is a diagram showing a configuration of a control block. The figure shows how the data is divided into fixed lengths, Fig. 8 shows how each divided data is added with a control block and chain number, and is worded. Fig. 9 shows how the data is stored in the area. FIG. 10, FIG. 10 is a flowchart showing a data read process, FIG. 11 is a view showing a format of read command data, FIG. 12 is a diagram showing a specific example of the read command data, and FIG.
FIG. 14 is a diagram showing a concrete example in the data memory, FIG. 14 is a diagram showing a concrete example of output of read data, FIG. 15 is a block diagram showing the configuration of an IC chip incorporated in the IC card, and FIG. 16 is I c
FIG. 17 is a block diagram showing a functional block of a card, FIG. 17 is a block diagram showing a configuration of a card reader / writer, and FIG. 18 is a block diagram showing a configuration of a card handling device. 1 …… IC card, 2 …… Card reader / writer, 15 ……
Control element, 16 ... Data memory (storage medium), 17 ... Program memory.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】外部装置から受信したデータを内蔵するメ
モリに対して所定のワード単位で書込むICカードであっ
て、 前記メモリ内におけるワードの長さ情報を記憶するワー
ド長記憶手段と、 前記外部装置から受信したデータを前記ワード長記憶手
段に記憶されたワードの長さ情報に基づいて固定長で分
割する分割手段と、 この分割手段で分割された先頭のデータを前記メモリの
記憶領域の一端のワード領域に書込む第1の書込手段
と、 前記先頭のデータ以降に継続する分割されたデータは前
記メモリの記憶領域の他端のワード領域から順次書込む
第2の書込手段と、 前記第1の書込手段および第2の書込手段によってデー
タを書込んだ際に該データに継続するデータが存在する
か否かを判定する判定手段と、 この判定手段で該データに継続するデータが存在しない
と判定された場合は該データに終了を示すデータを該ワ
ード領域に書込む第3の書込手段と、 前記判定手段で該データに継続するデータが存在すると
判定された場合は該データに継続するワード領域の位置
情報を該ワード領域に書込む第4の書込手段と、 を具備したことを特徴とするICカード。
1. An IC card for writing data received from an external device into a memory in which a predetermined word unit is written, and word length storage means for storing word length information in the memory, Dividing means for dividing the data received from the external device into fixed lengths based on the word length information stored in the word length storing means, and the leading data divided by the dividing means are stored in the storage area of the memory. First writing means for writing in the word area at one end, and second writing means for sequentially writing the divided data continuing after the head data from the word area at the other end of the memory area of the memory Determining means for determining whether or not there is continuous data in the data when the data is written by the first writing means and the second writing means; If it is determined that the data to be written does not exist, a third writing unit that writes data indicating the end of the data to the word area, and if the determination unit determines that there is continuous data to the data Is a fourth writing means for writing the position information of the word area continuing to the data in the word area.
JP61292763A 1986-12-09 1986-12-09 IC card Expired - Fee Related JPH0746376B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61292763A JPH0746376B2 (en) 1986-12-09 1986-12-09 IC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61292763A JPH0746376B2 (en) 1986-12-09 1986-12-09 IC card

Publications (2)

Publication Number Publication Date
JPS63145582A JPS63145582A (en) 1988-06-17
JPH0746376B2 true JPH0746376B2 (en) 1995-05-17

Family

ID=17786021

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61292763A Expired - Fee Related JPH0746376B2 (en) 1986-12-09 1986-12-09 IC card

Country Status (1)

Country Link
JP (1) JPH0746376B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3015377B2 (en) * 1988-08-26 2000-03-06 株式会社東芝 IC card
JP2560549B2 (en) * 1990-12-17 1996-12-04 凸版印刷株式会社 IC card
JPH05261563A (en) * 1992-03-23 1993-10-12 Mazda Motor Corp Welding equipment
JP3660364B2 (en) * 1993-07-29 2005-06-15 株式会社東芝 IC card and IC card handling device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS61216016A (en) * 1985-02-26 1986-09-25 Fujitsu Ltd Area control system for data base
JPS61226847A (en) * 1985-03-30 1986-10-08 Toshiba Corp In-block control method

Also Published As

Publication number Publication date
JPS63145582A (en) 1988-06-17

Similar Documents

Publication Publication Date Title
JP2537199B2 (en) IC card
US5093785A (en) Portable electronic device with memory having data pointers and circuitry for determining whether a next unwritten memory location exist
US4800520A (en) Portable electronic device with garbage collection function
US4839792A (en) Portable electronic apparatus with a device for determining data validity
US4949240A (en) Data storage system having circuitry for dividing received data into sequential wards each stored in storage region identified by chain data
JP2557838B2 (en) IC card
JP4891587B2 (en) Portable electronic device, IC card and IC module
JPH0746376B2 (en) IC card
JP3471842B2 (en) Data management device, data storage device, and data management method
JPH01217689A (en) Portable electronic equipment
JP2675563B2 (en) Portable electronic devices
JP2537198B2 (en) Portable electronic devices
JP2598056B2 (en) Portable electronic devices
JP2609645B2 (en) Portable electronic devices
JPS636690A (en) Portable electronic device
JP2001202487A (en) Portable electronic device and key collation method
JPH0760454B2 (en) Portable electronic device
JP2798957B2 (en) Portable electronic devices
JP2538907B2 (en) IC card
JPS63785A (en) Portable electronic equipment
JP2538906B2 (en) IC card
KR900006941B1 (en) Portable electronics
JP4177642B2 (en) Portable electronic device
JPS62196784A (en) Portable electronic device
JPS6376093A (en) Portable electronic device

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees