JPS63165986A - Data storage system - Google Patents

Data storage system

Info

Publication number
JPS63165986A
JPS63165986A JP61315561A JP31556186A JPS63165986A JP S63165986 A JPS63165986 A JP S63165986A JP 61315561 A JP61315561 A JP 61315561A JP 31556186 A JP31556186 A JP 31556186A JP S63165986 A JPS63165986 A JP S63165986A
Authority
JP
Japan
Prior art keywords
data
word
divided
stored
length
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
JP61315561A
Other languages
Japanese (ja)
Other versions
JPH0746377B2 (en
Inventor
Takashi Niimura
新村 貴志
Ryoichi Kuriyama
量一 栗山
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
Toshiba Intelligent Technology Co Ltd
Original Assignee
Toshiba Corp
Toshiba Intelligent Technology 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 Toshiba Corp, Toshiba Intelligent Technology Co Ltd filed Critical Toshiba Corp
Priority to JP61315561A priority Critical patent/JPH0746377B2/en
Publication of JPS63165986A publication Critical patent/JPS63165986A/en
Publication of JPH0746377B2 publication Critical patent/JPH0746377B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PURPOSE:To optionally store and read variable length data by dividing the data by fixed length and adding storing position information on the succeeding divided data to all these divided data. CONSTITUTION:When data are stored in a data area 6, these data are converted into the form of words. If the data to be stored exceeds the word length, the data is divided down to the length that can be stored within the word. The word containing the data is also accompanied by data (BCC: block check character) which secures the data of the word, a block (CB: control block) which shows the characteristics and the propriety of the data in the word, and data (CN: chain number) which shows the existing position (storage position) of the word following the relevant word.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、たとえばIcカードにおいて、そのデータメ
モリに対してデータを記憶するデータ記憶方式に関する
DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Application Field) The present invention relates to a data storage method for storing data in a data memory of an IC card, for example.

(従来の技術) 最近、新たな携帯可能なデータ記憶媒体として、不揮発
性のデータメモリおよび08口などの制御素子を有する
ICチップを内蔵したICカードが開発されている。こ
の種のICカードは、内部の制御素子あるいは外部装置
により内蔵するデータメモリに対してデータの記憶、読
出し、消去を行なうようになっている。
(Prior Art) Recently, an IC card containing a built-in IC chip having a nonvolatile data memory and a control element such as an 08 port has been developed as a new portable data storage medium. This type of IC card is designed to store, read, and erase data in a built-in data memory using an internal control element or an external device.

このようなICカードにおいて、データメモリに対して
データを記憶する従来のデータ記憶方式について以下説
明する。第7図はデータメモリのフォーマットを示して
おり、複数のエリアからなる。各エリアには、?!敗の
データ(それだけで意味を持つ一単位のデータ)を記憶
できる。外部からデータを受信し、記憶する順にその格
納情報としてのレコード番号が決定され、データはa続
している(データのRtAデータの次に即、次のデータ
の先頭データがくる)。新たにデータを追加記憶する場
合は、M8図の■に示すように、追加する前の1&柊デ
ータ(第8図におけるデータ(3)のIa後尾から追加
する。既に記憶されているデータの内容を書換える動作
を、1F!8図の■〜■にデータ(1)をS換える例と
して示す。
A conventional data storage method for storing data in a data memory in such an IC card will be described below. FIG. 7 shows the format of the data memory, which consists of a plurality of areas. In each area? ! It can memorize defeat data (a unit of data that has meaning on its own). Record numbers as storage information are determined in the order in which data is received from the outside and stored, and the data is continuous (the first data of the next data comes immediately after the RtA data). When additionally storing new data, as shown in ■ in Figure M8, add the 1 & Hiiragi data (from the end of Ia of data (3) in Figure 8) before adding. Contents of the data that have already been stored The operation of rewriting data (1) is shown as an example of changing data (1) to S in Figure 1F!8.

■既に記憶されているデータと同じ長さのデータ長を持
つデータにm換える場合、データの畠換えを正常に行な
う。
(2) When exchanging data to data having the same data length as already stored data, the data exchange is performed normally.

■既に記憶されているデータの長さよりも良いデータ長
を持つデータに書換える場合、既に記憶されているデー
タのt!囲を越え、次に続くデータ(2)を破壊しなけ
れば書込めないので、データの書換えは実行せず、エラ
ーとする。
■When rewriting data with a data length that is better than the length of the already stored data, t! of the already stored data! Since it is impossible to write data without destroying the next data (2), the data is not rewritten and an error occurs.

■既に記憶されているデータの長さよりも短いデータ長
を持つデータに1換える場合、虐操時は問題ないが、後
に続くデータ(2)の読出時に問題がでるために、デー
タのl換えは実行せず、エラーとする。
■If you replace 1 with data that has a shorter data length than the length of the data that has already been stored, there will be no problem during abuse, but there will be a problem when reading the following data (2), so replacing data with 1 is not a problem. Does not execute and results in an error.

読出時の問題について訳明する。第9図にm換前で、デ
ータ(3まで&!憶されているエリアを示す。
I will explain the problem when reading. Figure 9 shows the area where data (up to 3 &!) is stored before m conversion.

データにはその艮ざを示す情報(図中ではL]〜L3)
があり、これを用いて次々にデータを探していく。たと
えばデータ(21f読出す場合、まずデータ(1)の始
端Sを!S準としてデータ(1)の長さ情報し1を読み
、データ(1)のn1laPを探しだす。データ(1)
の終端Pは、すなわちデータ(′2Jの始端である。
Information indicating the appearance of the data (L] to L3 in the figure)
We use this to search for data one after another. For example, when reading data (21f), first, the length information of data (1) is obtained by using the starting end S of data (1) as !S quasi, and 1 is read, and n1laP of data (1) is found.Data (1)
The terminal end P of is the starting end of data ('2J).

このようにしてデータ(1)の終端Pを探し、データ■
の読出しを開始する。以上の111tIIlによりデー
タ(1)以降のデータを読出すため、Pにあたるものが
正確な位Cを示さないと、データ(1)よりも後ろに位
謂するデータは読出せない。第8因における■の動作結
果がこれに当たる。
In this way, find the terminal P of data (1), and
Start reading. Since the data after data (1) is read by the above 111tIIl, unless the thing corresponding to P indicates the correct place C, the data placed after data (1) cannot be read. This corresponds to the operation result of ■ in the eighth factor.

第8図において、既に記憶されているデータ(1)より
も短いデータ長を持つデータに(データ(1)を釦袂え
た場合を第10図に示す。新たにデータ(1)′を書込
んだ場合、正式なデータには影響ないが、図中斜線部の
ように確定していないデータの詰まった部分が生じる。
In Figure 8, Figure 10 shows the case where the data (1) is pressed to data with a shorter data length than the already stored data (1).New data (1)' is written. In this case, the official data will not be affected, but there will be areas filled with undefined data, such as the shaded areas in the figure.

データ(21を読出したい場合、データ(1)′ の始
端S′を基準としてデータ(1)′の長さ情報Ll’ 
を読み、データ(1)′のnraを探しだす。データが
全て正常に配列(データとデータが連続して配列)され
ている場合、(データの終端)−(次のデータの始端)
であった。正常な配列であるときと同じように考えて、
第10図の場合のデータ2の読出しを行なうと、P′が
データ(21の始端であると判断して読出すが、データ
(2)の長さm報L2の跣取り時、不確定なデータをも
読んでしまい、結局データ2は読出せず、エラーとなる
When you want to read data (21), the length information Ll' of data (1)' is taken as a reference from the start end S' of data (1)'.
Read and find nra of data (1)'. If all data is arranged correctly (data is arranged consecutively), (end of data) - (start of next data)
Met. Thinking in the same way as when it is a normal array,
When data 2 in the case of FIG. Data is also read, and in the end, data 2 cannot be read, resulting in an error.

このように、データψ位のlI換時、既存のデータのデ
ータ長と同一のデータ長を持ったデータでないとエラー
となる。また、データは次のデータと;l紐していなけ
ればならず 遭ml□丁いたいシ) 続出時に問題が生
じる。さらに、1つのデータの内部は11Rしていなけ
ればならず、その内部が途切れると、そのデータは意味
を無くし、読出不可能となる。また、データが連続して
いなければならないので、空間部分が多く存在していて
も、散乱して存在している場合、大きなデータ長のデー
タは書込めない。
In this way, when data ψ is converted to lI, an error will occur if the data does not have the same data length as the existing data. Also, the data must be linked to the next data (encounter□diteaishi)) Problems arise when data appears one after another. Furthermore, the inside of one data must be 11R, and if the inside is interrupted, the data loses its meaning and becomes unreadable. Furthermore, since the data must be continuous, even if there are many spatial parts, if they are scattered, data with a large data length cannot be written.

(発明が解決しようとする問題点) 本発明は、上記したように既に記憶されているデータを
そのデータ長と異なるデータ長を持つデータに書換える
場合の問題点を解決すべくなされたもので、既に記憶さ
れているデータをそのデータ長と異なるデータ長を持つ
データに書換える場合、問題なく行なえ、データの読出
時にも支障が無いデータ記憶方式を提供することを目的
とする。
(Problems to be Solved by the Invention) The present invention has been made to solve the above-mentioned problems when rewriting already stored data to data having a data length different from the data length. To provide a data storage system which allows rewriting of already stored data to data having a data length different from the data length without any problem and also causes no trouble when reading data.

[発明の構成] (問題点を解決するための手段) 本発明は、記!!媒体に対してデータを記憶するデータ
記憶方式で、前記データを固定長で分割し、この分割し
た各分割データ全てにそれ以降継続する分割データの記
憶位置情報を付加し、この記憶位置情報を付加した各分
割データの先頭の分割データは前記記憶媒体の一端から
記憶し、その先頭の分割データ以降に継続する分割デー
タは前記記憶媒体の他端から記憶するものであって、所
定のデータの1換時、当該データの先頭の分割データを
新たなデータの先頭の分割データに自換えるとともに、
それに継続する分割データの記憶エリアを消去し、新た
なデータの前記先頭の分割データに継続する分割データ
を前記記憶媒体の他端の空エリアから順に記憶するもの
である。
[Structure of the Invention] (Means for Solving the Problems) The present invention has the following features! ! A data storage method in which data is stored on a medium, in which the data is divided into fixed length pieces, and storage location information of subsequent divided data is added to each of the divided data, and this storage location information is added. The first divided data of each divided data is stored from one end of the storage medium, and the divided data that continues after the first divided data is stored from the other end of the storage medium, and one of the predetermined data At the time of exchange, the first divided data of the data is replaced with the first divided data of new data, and
The storage area of the divided data that continues therefrom is erased, and the divided data that continues from the first divided data of new data is stored in order from the empty area at the other end of the storage medium.

(作用) その結果、データは次のデータと連続していなければな
らないという制約、データの内部も連続していなければ
ならないといった制約を無くし、これら制約により従来
発生していたエラーをエラーとして取損わず、正常に可
変長データの記憶、読出しなどの動作が任意に行なえる
。また、一単位のデータを構成する分割データ全てにそ
れ以降継続する分割データの記憶位置情報を付加するこ
とにより、どの位置にデータが存在しようとも簡単に探
すことができる。
(Effect) As a result, the constraints that data must be continuous with the next data and that the inside of the data must be continuous are eliminated, and errors that previously occurred due to these constraints can be treated as errors and treated as errors. Therefore, operations such as storing and reading variable-length data can be performed normally. Further, by adding storage position information of subsequent divided data to all divided data constituting one unit of data, it is possible to easily search for data no matter where it exists.

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

第6図は本発明に係るICカードの構成を概略的に示す
もので、制御素子(たとえばCPU)1、記憶内容が消
去可能な不揮発性のデータメモリ2、プログラムメモリ
3、および図示しないカードリーダ・ライタとの電気的
接触を得るためのコンタクト部4によって構成されてお
り、これらのうち破線内の部分(制御素子1、データメ
モリ2、プログラムメモリ3)は1つのICチップで構
成され、ICカード内に埋設されている。データメモリ
2は、たとえばEEPROMで構成されており、各種デ
ータの記憶に使用される。プログラムメモリ3は、たと
えばマスクROMで構成されており、制御素子1の制御
プログラムなどが記憶されている。
FIG. 6 schematically shows the configuration of an IC card according to the present invention, which includes a control element (for example, a CPU) 1, a nonvolatile data memory 2 whose storage contents can be erased, a program memory 3, and a card reader (not shown).・Consists of a contact part 4 for obtaining electrical contact with the writer, and of these, the part within the broken line (control element 1, data memory 2, program memory 3) is composed of one IC chip, It is embedded within the card. The data memory 2 is composed of, for example, an EEPROM, and is used to store various data. The program memory 3 is composed of, for example, a mask ROM, and stores control programs for the control element 1 and the like.

第5図はデータメモリ2のフォーマットを示すもので、
各エリアの制御を行なうディレクトリエリア5と、各種
データを記憶するための複数のデータエリア6とに分割
されている。各データエリア6内は、ある固定長(λバ
イト)を持つワードで分割され、これら各ワードには物
理的アドレスの低い値の方から1.2.3.・・・とり
−ド番号が付与される。このワード番号はどこにも記憶
されていない。
Figure 5 shows the format of data memory 2.
It is divided into a directory area 5 for controlling each area and a plurality of data areas 6 for storing various data. Each data area 6 is divided into words with a fixed length (λ bytes), and each word is divided into words with a physical address of 1.2.3. ...A lead number is assigned. This word number is not stored anywhere.

このような構成において本発明のデータ記憶方式につい
て詳細に説明する。データエリア6にデータを記憶する
場合、そのデータをワードの形に変換しなければならな
い。もしも、記憶したいデータの長さがワードの長さを
越える場合、ワードに収まる長さに分割する。また、ワ
ードは単にデータが存在するだけではなく、第4図に示
すようにワードのデータを保障するデータ(BCC;ブ
ロック・チェック・キャラクタ)、ワード内のデータの
性格、正当性を表わすブロック(CB :コント0−ル
・ブロック)、そのワードの次に続くべきワードの存在
位置(記憶位置)を表わすデータ(CN ;チェイン・
ナンバ、ワード番号が用いられる)も付随している。
The data storage method of the present invention in such a configuration will be explained in detail. When storing data in the data area 6, the data must be converted into word form. If the length of the data to be stored exceeds the length of a word, it is divided into pieces of length that fit within the word. In addition, a word does not simply contain data; as shown in Figure 4, there is data (BCC; block check character) that guarantees the data in the word, and blocks (blocks) that indicate the nature and validity of the data in the word. CB: control block), data representing the location (memory location) of the word that should follow the word (CN: chain block);
(number, word number is used) is also attached.

ワード長よりも長いデータ長を持つデータを記憶する場
合の方法を第4図に示す。データは、図示のようにデー
タの長さ情報と記憶データとからなる。ワード長くλバ
イト)に準じる分割基準値(多−2バイト)で分割され
たものは、第3図に示すように2種類のワードに分けら
れる。これらワードの区別は、そのワード中にデータの
長さ情報を含んでいるか否かによる。データの長さ情報
をデータ部に持つワードを先頭ワードであるとしてディ
レクトリワード(DW:D i rectryWord
)、それに続くワードをフォローワード(FW:Fol
low  Word)とする。各ワード中には、次にく
るべきワード番号が記憶されているので、たとえばAの
CNにはBのワード番号が入っている。第2図と合せて
見ると、Aに相当するDWlのCNには、次に続くべき
データの入ったワードであるFWltの記憶されている
ワード番号(n>が入っている。Bに相当するFW+ 
tのCNには、次に続くべきデータの入ったワードであ
るFWt2の記憶されているワード番号(n−1)が入
っている。なお、Cに相当するFWt2のONには、デ
ータを復元した場合にR後尾データを含んでいる、つま
り次に続くべきワードが無いので、最終ワードであるこ
とを示すデータを入れる。
FIG. 4 shows a method for storing data having a data length longer than the word length. The data consists of data length information and storage data as shown. Words that are divided by the division standard value (multi-2 bytes) based on the word length (lambda bytes) are divided into two types of words as shown in FIG. These words are distinguished depending on whether or not the word contains data length information. The word with data length information in the data part is the first word, and the directory word (DW) is
), the following word is a follow word (FW: Fol
Low Word). Each word stores the next word number, so for example, the CN of A contains the word number of B. When viewed in conjunction with Figure 2, CN of DWl corresponding to A contains the word number (n>) stored in FWlt, which is the word containing the next data. FW+
CN of t contains the stored word number (n-1) of FWt2, which is the word containing the next data. Note that when the data is restored, FWt2 corresponding to C contains data at the end of R, that is, there is no next word to continue, so data indicating that it is the final word is entered.

これらのワードは、第2図に示す順にデータエリア6に
記憶される。DWlは、エリアの先頭から見て空いてい
るワード、または指定されたデータのDWrが記憶され
ているワードに入る(前者は追記、後者は書換えを示す
)。記憶されたD W 1に続くべきFWt t 、F
Wt 2は、エリアの最下ワードから空いているワード
を探して記憶される。このとき、DWの記憶されている
ワードの順番には、「何番目のデータのDWであるか」
といったデータの標識(レコード番号)の役目を持つ。
These words are stored in the data area 6 in the order shown in FIG. DWl is placed in an empty word viewed from the beginning of the area, or in a word in which DWr of designated data is stored (the former indicates additional writing, and the latter indicates rewriting). FWt t , F to follow the stored D W 1
Wt 2 is stored by searching for an empty word from the bottom word of the area. At this time, in the order of the words stored in the DW, "What number of data is the DW in?"
It serves as a data indicator (record number).

すなわち、レコード番号の順にそのデータ内のDWをエ
リアの先頭から記憶していけばよいのである。ワードの
並びでDWの番号およびレコード番号が判別できるので
、DWの並びは(順番は)変更することができない。以
上のような動作により、データ1〜3まで記憶した例と
して第1図(a)を示す。
That is, it is sufficient to store the DWs in the data in the order of record numbers from the beginning of the area. Since the DW number and record number can be determined from the word arrangement, the DW arrangement (order) cannot be changed. FIG. 1(a) shows an example in which data 1 to 3 are stored through the above operations.

以下、本発明の最大のメリットである可変長データの書
換えについて第1図を用いて説明する。
The rewriting of variable length data, which is the greatest advantage of the present invention, will be described below with reference to FIG.

第1図(a)のようにワードが詰まったエリアが存在し
たとする。今、このエリア内のレコード番号「1」のデ
ータの消去が行なわれた。その結果が第1図(b)であ
る。レコード番号「1」のデータは、第1図(a)にお
いてDWl、FWlt 。
Assume that there is an area filled with words as shown in FIG. 1(a). The data of record number "1" in this area has now been erased. The result is shown in FIG. 1(b). The data of record number "1" are DWl and FWlt in FIG. 1(a).

FWt2であったが、消去された後、FWt t 。It was FWt2, but after being erased, it became FWtt.

FWt2が存在していた所は完全な空白ワードとなり、
どのようなデータ(レコード番号およびDW/FWに左
右されないデータ)でも新たに記憶できる。これに対し
、DWrの存在していたワードは完全な空白ワードでは
ない。過去、DWが存在していたワードにFWを記憶す
ると、エリアの先頭からDWを数えていく本方式ではD
Wの順番が狂い、つまりはレコード番号が狂ってしまう
ことになる。故に、DWは消去したとしても、以前DW
が記憶されていたという情報を残すか、DWだけが存在
する場所を確保してから消去しなければならない。第1
図(b)では、以前D W sが記憶されていたという
意味で「del・DWt Jと示した。
The place where FWt2 existed becomes a completely blank word,
Any data (data not affected by record number and DW/FW) can be newly stored. In contrast, the word where DWr was present is not a completely blank word. If FW is stored in a word where DW existed in the past, this method counts DW from the beginning of the area.
The order of the W's will be out of order, which means the record numbers will be out of order. Therefore, even if the DW is deleted, the previous DW
Either you must leave the information that the DW was stored, or you must secure a place where only the DW exists and then delete it. 1st
In Figure (b), it is indicated as "del•DWt J" to mean that DWs was previously stored.

続いて、レコード番号「1」のデータを新たに記憶する
場合、そして新たに記憶するデータのデータ長が以前の
データのデータ長よりも1ワード分少なかった場合を第
1図(C)に示す。del・DWlの部分に新しいデー
タのDWが記憶され(NEW−DWlと示す)、NEW
−FWt tもエリアのR1!i尾から空白ワードを探
して記憶される。第1図(b)でFWlt 、F’Ah
 2が消去されているので、第1図(C)ではFWlt
と同じ所にNEW−FWxtが記憶される。このとき、
NEW−FWt 1とFW21との間に1ワードの空白
が存在するが、新たにFWがくれば、そこに記憶される
ので問題はない。読出しの場合も、もちろん問題はない
。たとえば第1図(d)のように、DW+ (FWxl
 )で構成されるデータ(レコード番号「4」)が記憶
された場合、FWIIとFW2 sとの間の空白にはF
W41が記憶される。
Next, Figure 1 (C) shows the case where data with record number "1" is newly stored and the data length of the newly stored data is one word less than the data length of the previous data. . The new data DW is stored in the del・DWl part (indicated as NEW-DWl), and NEW
-FWt t is also R1 in the area! A blank word is searched from the i-tail and stored. In Fig. 1(b), FWlt, F'Ah
2 has been deleted, so in Figure 1(C), FWlt
NEW-FWxt is stored in the same location as . At this time,
There is a blank space of one word between NEW-FWt 1 and FW21, but if a new FW comes, it will be stored there, so there is no problem. Of course, there is no problem in the case of reading. For example, as shown in FIG. 1(d), DW+ (FWxl
) (record number "4") is stored, the blank between FWII and FW2s is filled with F.
W41 is stored.

ここで、読出しの場合を考えてみる。たとえば゛ レコ
ード番号「2」の読出しを行なう。第1図(d)に示す
状態のエリアを指定し、同時にレコード番号「2」を指
定して、続出コマンドを受けるとエリアを探し、レコー
ド番号「2」のDW2を探す。探し方は、まずエリアの
先頭からワード中位でレコード番号分カウントしていく
。この場合、レコード番号は「2」であるから、先頭か
ら2番目のDWをDW2と認識する。DW2には、次に
続くべきFW21の存在するワード番号(FW21なら
ばワード番号−7)が記憶されているので、FWの並び
に関係なくしてFW2tを認識できる。
Now, consider the case of reading. For example, read record number "2". Specifying the area in the state shown in FIG. 1(d) and specifying the record number "2" at the same time, and upon receiving successive commands, searches the area and searches for DW2 with the record number "2". To search, start by counting record numbers from the beginning of the area to the middle of the word. In this case, since the record number is "2", the second DW from the beginning is recognized as DW2. Since DW2 stores the word number of the next FW21 (word number -7 for FW21), FW2t can be recognized regardless of the arrangement of the FWs.

このように、とにかく空白であるワードにデータを記憶
していく方法は、今まで不可能であった可変長データの
書換えが難なく行なえる。
In this way, by storing data in words that are blank anyway, it is possible to easily rewrite variable length data, which has been impossible until now.

従来では、記憶データが連続しており、またデータも別
のデータと連続していなければならず、一度データとデ
ータとの繋がりを作ってしまったならば(第9図参照)
、データとデータとの間にデータと無関係な部分を作っ
てしまうと(第10図参照)、データとデータとの境界
がわからず、エリアの破壊ということになる。その点、
本発明方式は、始めからデータは分割され、分割された
ワードもDW以外その並びを気にしないので問題がない
。たとえば第1図(d)のようにDW+(FWX 1 
’)で構成されるデータ(レコード番号[2J)を、D
W+ (FWx2)の大きさに分割されるデータに書換
える場合、エリア全体でDW十(FWX2)の空間が存
在するならば、充分書換えることができ、その閤換えた
結果を第1図(e)に示す。
Conventionally, stored data is continuous, and data must also be continuous with other data, and once a connection is made between data (see Figure 9)
If a part unrelated to the data is created between the data (see Fig. 10), the boundary between the data cannot be recognized and the area will be destroyed. That point,
In the method of the present invention, data is divided from the beginning, and the arrangement of the divided words does not matter except for the DW, so there is no problem. For example, as shown in Figure 1(d), DW+(FWX 1
') (record number [2J)
When rewriting data into data that is divided into a size of W+ (FWx2), if there is a space of DW10 (FWX2) in the entire area, it can be rewritten sufficiently, and the rewritten result is shown in Figure 1 ( Shown in e).

なお、第1図(f)は第1図(e)の状態でレコード番
@「2」および「3」のデータを消去した例を示し、第
1図(q)は第1図(f)の状態でレコード’a@[5
Jのデータを記憶した例を示している。
In addition, Fig. 1(f) shows an example in which data of record numbers @ "2" and "3" is deleted in the state of Fig. 1(e), and Fig. 1(q) shows an example of erasing the data of record numbers @ "2" and "3" in the state of Fig. 1(f). Record 'a@[5
An example in which data of J is stored is shown.

このように、データメモリの分割された各エリアを固定
長を持つワードで分割するとともに、記憶するデータも
上記固定長で分割し、これら分割した各分割データ全て
にそれ以降継続する分割データの記憶位置を示すワード
番@(チェイン・ナンバ)を付加し、このワード番号を
付加した各分割データの先頭の分割データはエリアの先
頭ワードから記憶し、その先頭の分割データ以降に継続
する分割データはエリアのRHワードから記憶する。そ
して、所定のデータの書換時、当該データの先頭の分割
データを新たなデータの先頭の分割データに書換えると
ともに、それに継続する分割データのワードを消去し、
新たなデータの上記先頭の分割データに継続する分割デ
ータをエリアの最終ワードから空いているワードを探し
て順に記憶するものである。
In this way, each divided area of the data memory is divided into words with a fixed length, and the data to be stored is also divided into the above fixed length, and each divided data is used to store the subsequent divided data. A word number @ (chain number) indicating the position is added, and the first divided data of each divided data to which this word number is added is stored from the first word of the area, and the divided data that continues after the first divided data is stored. Store from the RH word of the area. Then, when rewriting predetermined data, the first divided data of the data is rewritten to the first divided data of new data, and the words of the divided data that follow it are erased,
The divided data continuing from the first divided data of the new data are sequentially stored by searching for empty words from the last word of the area.

このようなデータ記憶方式によれば、従来のようなデー
タは次のデータと連続していなければならないというI
11約、データの内部も連続していなければならないと
いった制約を無くし、これら制約により従来発生してい
たエラーをエラーとして取扱わず、正常に可変長データ
の記憶、読出しなどの動作が任意に行なえる。また、一
単位のデータを構成する分割データ全てにそれ以降継続
する分割データの記憶位置情報(ワード番号)を付加す
ることにより、どの位置にデータが存在しようとも簡単
に探すことができ、アクセス時間が著しく速くなる。
According to this data storage method, there is a conventional problem that data must be continuous with the next data.
11) Eliminates the constraint that the internal data must be continuous, and due to these constraints, errors that conventionally occur are no longer treated as errors, and operations such as storing and reading variable-length data can be performed normally. . In addition, by adding storage location information (word numbers) of subsequent divided data to all divided data that makes up one unit of data, it is possible to easily search for data no matter where it exists, and access time is reduced. becomes significantly faster.

なお、前記実施例では、ICカードに内蔵されるデータ
メモリに対してデータを記憶する場合について説明した
が、本発明はこれに限定されるものでなく、他の記憶媒
体に対してデータを記憶する場合にも同様に適用できる
In the above embodiment, the case where data is stored in the data memory built into the IC card has been described, but the present invention is not limited to this, and data may be stored in other storage media. The same applies to cases where

[発明の効果] 以上詳述したように本発明によれば、既に記憶されてい
るデータをそのデータ長と異なるデータ長を持つデータ
に書換える場合、問題なく行なえ、データの続出時にも
支障が無いデータ記憶方式を提供できる。
[Effects of the Invention] As described in detail above, according to the present invention, when data that has already been stored is rewritten to data having a data length different from the data length, it can be rewritten without any problem, and there is no problem when data is continuously rewritten. It can provide a data storage method that does not exist before.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図ないし第6図は本発明の一実施例を説明するため
のもので、第1図はエリア内のデータ記憶例を示す図、
第2図はワードの記憶順序を説明する図、第3図はワー
ドの意味付けを説明する図、第4図はデータを固定長で
分割しワード化した様子を示す図、第5図はデータメモ
リのエリア体系を示す図、第6図はICカードの構成を
概略的に示すブロック図、第7図ないし第10図は従来
のデータ記憶方式を説明するためのもので、第7図はデ
ータメモリのフォーマット例を示す図、第8図はデータ
の記憶例を示す図、第9図は正常なデータの存在例を示
す図、第10図は異常なデータの存在例を示す図である
。 1・・・・・・制御素子、2・・・・・・データメモリ
(記憶媒体)、3・・・・・・プログラムメモリ、5・
・・・・・ディレクトリエリア、6・・・・・・データ
エリア。 出願人代理人 弁理士 鈴 江 武 彦第2図 第3図 第4図 第6図 第7図 5               p 第9図 第10図
1 to 6 are for explaining one embodiment of the present invention, and FIG. 1 is a diagram showing an example of data storage in an area;
Figure 2 is a diagram explaining the storage order of words, Figure 3 is a diagram explaining the meaning of words, Figure 4 is a diagram showing how data is divided into fixed lengths and converted into words, and Figure 5 is a diagram explaining the data FIG. 6 is a block diagram schematically showing the structure of an IC card. FIGS. 7 to 10 are for explaining conventional data storage systems. FIG. FIG. 8 is a diagram showing an example of a memory format, FIG. 8 is a diagram showing an example of data storage, FIG. 9 is a diagram showing an example of the existence of normal data, and FIG. 10 is a diagram showing an example of the existence of abnormal data. DESCRIPTION OF SYMBOLS 1...Control element, 2...Data memory (storage medium), 3...Program memory, 5.
...Directory area, 6...Data area. Applicant's Representative Patent Attorney Takehiko Suzue Figure 2 Figure 3 Figure 4 Figure 6 Figure 7 Figure 5 p Figure 9 Figure 10

Claims (2)

【特許請求の範囲】[Claims] (1) 記憶媒体に対してデータを記憶するデータ記憶
方式で、前記データを固定長で分割し、この分割した各
分割データ全てにそれ以降継続する分割データの記憶位
置情報を付加し、この記憶位置情報を付加した各分割デ
ータの先頭の分割データは前記記憶媒体の一端から記憶
し、その先頭の分割データ以降に継続する分割データは
前記記憶媒体の他端から記憶するものであつて、所定の
データの書換時、当該データの先頭の分割データを新た
なデータの先頭の分割データに書換えるとともに、それ
に継続する分割データの記憶エリアを消去し、新たなデ
ータの前記先頭の分割データに継続する分割データを前
記記憶媒体の他端の空エリアから順に記憶することによ
り、異なるデータ長のデータの書換えを可能にしたこと
を特徴とするデータ記憶方式。
(1) A data storage method in which data is stored in a storage medium, in which the data is divided into fixed-length pieces, and storage location information of subsequent divided data is added to each piece of divided data. The first divided data of each divided data to which position information has been added is stored from one end of the storage medium, and the divided data that continues after the first divided data is stored from the other end of the storage medium, and When rewriting data, the first divided data of the relevant data is rewritten to the first divided data of new data, the storage area of the subsequent divided data is erased, and the new data continues with the first divided data. 1. A data storage system characterized in that data of different data lengths can be rewritten by sequentially storing divided data starting from an empty area at the other end of the storage medium.
(2) 前記記憶媒体はICカード内に設けられるデー
タメモリであることを特徴とする特許請求の範囲第1項
記載のデータ記憶方式。
(2) The data storage system according to claim 1, wherein the storage medium is a data memory provided in an IC card.
JP61315561A 1986-12-26 1986-12-26 IC card data storage method Expired - Fee Related JPH0746377B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61315561A JPH0746377B2 (en) 1986-12-26 1986-12-26 IC card data storage method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61315561A JPH0746377B2 (en) 1986-12-26 1986-12-26 IC card data storage method

Publications (2)

Publication Number Publication Date
JPS63165986A true JPS63165986A (en) 1988-07-09
JPH0746377B2 JPH0746377B2 (en) 1995-05-17

Family

ID=18066826

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61315561A Expired - Fee Related JPH0746377B2 (en) 1986-12-26 1986-12-26 IC card data storage method

Country Status (1)

Country Link
JP (1) JPH0746377B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10116329A (en) * 1996-10-11 1998-05-06 Nec Telecom Syst Ltd Non-contact card and its holding information storing system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS603035A (en) * 1983-06-20 1985-01-09 Canon Inc Storage device
JPS6122684A (en) * 1984-04-24 1986-01-31 住友電気工業株式会社 Method of forming semiconductive circuit
JPS61216016A (en) * 1985-02-26 1986-09-25 Fujitsu Ltd Area control system for data base

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS603035A (en) * 1983-06-20 1985-01-09 Canon Inc Storage device
JPS6122684A (en) * 1984-04-24 1986-01-31 住友電気工業株式会社 Method of forming semiconductive circuit
JPS61216016A (en) * 1985-02-26 1986-09-25 Fujitsu Ltd Area control system for data base

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10116329A (en) * 1996-10-11 1998-05-06 Nec Telecom Syst Ltd Non-contact card and its holding information storing system

Also Published As

Publication number Publication date
JPH0746377B2 (en) 1995-05-17

Similar Documents

Publication Publication Date Title
JP2537199B2 (en) IC card
US4797543A (en) Selectable data readout IC card
US4295041A (en) Device for the protection of access to a permanent memory of a portable data carrier
KR890012289A (en) How to Store Data on a Recording Tape
JP3122222B2 (en) Memory card device
EP3057100B1 (en) Memory device and operating method of same
JPH0613890A (en) Safe counting method for binary electronic counter
JPS63165986A (en) Data storage system
JP3471842B2 (en) Data management device, data storage device, and data management method
JP3088866B2 (en) IC card
JP3117244B2 (en) EEPROM control device
CN107562655B (en) A kind of date storage method and device
JPH04313882A (en) Record control system for memory card
JPH0746376B2 (en) IC card
JP3088867B2 (en) IC card
CN108415852B (en) Data access method of Flash memory
JP2565717B2 (en) IC card
JP2538906B2 (en) IC card
JPH0546489A (en) Memory card apparatus using eeproms for storing data and an interface buffer for buffering data transfer between the eeproms and anexternal device.
JPS63200399A (en) Data processing system
JP2798957B2 (en) Portable electronic devices
JPH05313989A (en) Memory card device
JP2538907B2 (en) IC card
JPS6051924A (en) External character access system
JPH0795306B2 (en) Data storage device

Legal Events

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