KR20070096195A - Transcation processing method using a ram transaction buffer - Google Patents

Transcation processing method using a ram transaction buffer Download PDF

Info

Publication number
KR20070096195A
KR20070096195A KR1020060025638A KR20060025638A KR20070096195A KR 20070096195 A KR20070096195 A KR 20070096195A KR 1020060025638 A KR1020060025638 A KR 1020060025638A KR 20060025638 A KR20060025638 A KR 20060025638A KR 20070096195 A KR20070096195 A KR 20070096195A
Authority
KR
South Korea
Prior art keywords
transaction
ram
buffer
data
commit
Prior art date
Application number
KR1020060025638A
Other languages
Korean (ko)
Inventor
유주열
김해중
Original Assignee
시큐어플랫폼즈테크놀로지(주)
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 시큐어플랫폼즈테크놀로지(주) filed Critical 시큐어플랫폼즈테크놀로지(주)
Priority to KR1020060025638A priority Critical patent/KR20070096195A/en
Publication of KR20070096195A publication Critical patent/KR20070096195A/en

Links

Images

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01QANTENNAS, i.e. RADIO AERIALS
    • H01Q1/00Details of, or arrangements associated with, antennas
    • H01Q1/12Supports; Mounting means
    • H01Q1/1207Supports; Mounting means for fastening a rigid aerial element
    • H01Q1/1221Supports; Mounting means for fastening a rigid aerial element onto a wall
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01QANTENNAS, i.e. RADIO AERIALS
    • H01Q3/00Arrangements for changing or varying the orientation or the shape of the directional pattern of the waves radiated from an antenna or antenna system
    • H01Q3/02Arrangements for changing or varying the orientation or the shape of the directional pattern of the waves radiated from an antenna or antenna system using mechanical movement of antenna or antenna system as a whole
    • H01Q3/04Arrangements for changing or varying the orientation or the shape of the directional pattern of the waves radiated from an antenna or antenna system using mechanical movement of antenna or antenna system as a whole for varying one co-ordinate of the orientation
    • H01Q3/06Arrangements for changing or varying the orientation or the shape of the directional pattern of the waves radiated from an antenna or antenna system using mechanical movement of antenna or antenna system as a whole for varying one co-ordinate of the orientation over a restricted angle

Landscapes

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

Abstract

A transaction processing method using an RAM(Random Access Memory) transaction buffer is provided to shorten a processing time by reducing the frequency of EEPROM(Electrically Erasable and Programmable Read Only Memory) writing for processing transaction, thereby improving the performance of a smart card. A transaction processing method using an RAM(Random Access Memory) transaction buffer comprises the following steps of: starting a transaction process according to a transaction start signal(ST-2); storing data inputted or requested by a transaction processing routine in the RAM transaction buffer(ST-4); determining whether there is commit transaction and performing internal transaction if the commit transaction is generated(ST-6); and performing automatic roll back of the transaction if the commit transaction is not generated(ST-7).

Description

램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법{Transcation processing method using a RAM transaction buffer}Transaction processing method using a RAM transaction buffer}

도 1은 종래 기술에 따른 이이피롬 트랜잭션 버퍼(EEPROM Transaction Buffer)에서의 이이피롬 라이팅(EEPROM Writing)에 대해 표현한 데이터 정보 구조를 나타낸 도면이다.FIG. 1 is a diagram illustrating a data information structure expressed for EEPROM writing in an EEPROM Transaction Buffer according to the prior art.

도 2 내지 도 6은 트랜잭션 처리과정시 일어나는 EEPROM 트랜잭션 버퍼와 실제 저장위치 및 데이터 정보 구조를 나타낸 도면이다.2 through 6 are diagrams illustrating an EEPROM transaction buffer, an actual storage location, and a data information structure that occur during transaction processing.

도 7은 본 발명에 따른 하나의 램 트랜잭션 버퍼를 이용한 트랜잭션 처리과정에서의 데이터 정보 구조를 나타낸 도면이다.7 is a diagram illustrating a data information structure in a transaction processing process using one RAM transaction buffer according to the present invention.

도 8 내지 도 12는 본 발명에 다른 램 트랜잭션 버퍼를 이용한 트랜잭션 처리과정시 일어나는 램 트랜잭션 버퍼와 실제 저장위치 및 데이터 정보 구조를 나타낸 도면이다.8 to 12 are diagrams illustrating a RAM transaction buffer, an actual storage location, and a data information structure that occur during a transaction process using a RAM transaction buffer according to the present invention.

도 13은 본 발명에 따른 램 트랜잭션 버퍼를 이용한 트랜잭션 처리 과정의 흐름도이다.13 is a flowchart illustrating a transaction processing process using a RAM transaction buffer according to the present invention.

* 도면의 주요 부분에 대한 부호의 설명 *Explanation of symbols on the main parts of the drawings

5a: 램 트랜잭션 버퍼5a: RAM transaction buffer

6a: 이이피롬6a: Ypyrom

61,62,63: 저장영역61,62,63: storage area

21,211,212,213: 데이터 정보 구조21,211,212,213: data information structure

411: 트랜잭션 스타트 플래그411: transaction start flag

412: 트랜잭션 테일 포인터412: transaction tail pointer

A,B,C: 이이피롬(EEPROM)의 실제 저장영역A, B, C: Real storage of EEPROM

본 발명은 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법에 관한 것으로, 특히 램 버퍼를 사용하여 데이터 처리속도를 높이면서도 데이터의 무결성을 보장하는 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법에 관한 것이다.The present invention relates to a transaction processing method using a RAM transaction buffer, and more particularly, to a transaction processing method using a RAM transaction buffer which guarantees the integrity of data while increasing the data processing speed using the RAM buffer.

스마트카드에서 데이터 트랜잭션(Data Transaction)작업을 수행 시 스마트카드의 전원이 꺼지거나 카드를 카드리더기(Card Accepting Device:CAD)에서 제거하는 행위 등이 발생했을 때 Data의 무결성이 훼손되게 된다.When performing a data transaction on a smart card, the integrity of the data is compromised when the smart card is powered off or the card is removed from the card accepting device (CAD).

이를 방지하기 위해 기존의 스마트카드에서는 데이터 트랜잭션시 이이피롬(EEPROM)을 트랜잭션 버퍼(Transaction Buffer)로 사용함으로써 데이터의 무결성을 보장하는 방법을 취하였다.In order to prevent this problem, the existing smart card uses EEPROM as a transaction buffer to ensure data integrity.

그런데 이런 이이피롬 트랜잭션 버퍼를 사용하게 되면 램 트랜잭션 버퍼(RAM Transaction Buffer)보다 트랜잭션 처리 시간이 더 소모 된다. 통상 이이피롬의 ㄷ 데이터 라이트 타임(data write time)은 램(RAM)의 데이터 라이트 타임보다 1000배 이상 늦기 때문이다. However, using this EPROM transaction buffer takes more transaction processing time than RAM transaction buffer. This is because the data write time of Ipyrom is 1000 times later than the data write time of RAM.

그러나 램 버퍼(RAM Buffer)를 사용하면 파워 다운(Power Down)시 데이터가 소멸될 수 있으므로, 데이터의 무결성을 보장할 수 없게 된다. 이에 추가적으로 램 버퍼를 사용하여 데이터 처리속도를 높이면서도 데이터의 무결성을 보장하는 새로운 방법을 구현하였다.However, the use of a RAM buffer can destroy data during power down, and thus cannot guarantee data integrity. In addition, the RAM buffer is used to implement a new method to ensure data integrity while increasing data throughput.

트랜잭션(Transaction)의 정의Transaction Definition

컴퓨터 프로그램에서 트랜잭션의 일반적인 의미는 정보의 교환이나 데이터베이스 갱신 등 연관되는 일련의 연속적인 작업을 의미하는데, 데이터베이스나 저장된 데이터의 무결성이 보장되는 상태에서 요청된 작업을 완수하기 위한 작업의 기본 단위이다. 트랜잭션이 성공리에 끝났을 때 이루어지는 데이터베이스나 저장된 데이터의 갱신을 "커밋(commit)" 이라고 부르며, 트랜잭션이 실패 되었을 때 데이터베이스나 저장된 데이터의 수정 내용이 취소되는 것을 "롤백(rollback)"이라고 부른다. 스마트 카드(smart Card)에서 무결성을 보장하기 위해서는 일반적인 PC보다 열악한 환경으로 인해 거의 모든 이이피롬 저장 데이터에 대해 무결성이 보장되는 트랜잭션 처리를 해야 한다.The general meaning of a transaction in a computer program is a series of contiguous tasks, such as exchanging information or updating a database, which are the basic units of work for accomplishing the requested task while ensuring the integrity of the database or stored data. Updates to the database or stored data that occur when a transaction completes successfully are called "commits", and modifications to the database or stored data when a transaction fails are called "rollbacks." In order to guarantee the integrity of a smart card, it is necessary to perform a transaction processing that guarantees integrity on almost all EPI data stored in a worse environment than a general PC.

도 1은 종래 기술에 따른 이이피롬 트랜잭션 버퍼(EEPROM Transaction Buffer)에서의 이이피롬 라이팅(EEPROM Writing)에 대해 표현한 데이터 정보 구조 를 나타낸 도면이고, 도 2 내지 도 6은 트랜잭션 처리과정시 일어나는 EEPROM 트랜잭션 버퍼와 실제 저장위치 및 데이터 정보 구조를 나타낸 도면이다.1 is a view showing a data information structure expressed for EEPROM Writing in an EEPROM Transaction Buffer according to the prior art, Figures 2 to 6 is an EEPROM transaction buffer that occurs during transaction processing And a diagram showing the actual storage location and data information structure.

도 1 내지 도 6을 참조하여 이이피롬 트랜잭션 버퍼를 이용한 트랜잭션 동작을 설명한다.A transaction operation using an EPROM transaction buffer will be described with reference to FIGS. 1 to 6.

일반적으로 하나의 이이피롬 라이팅(EEPROM Writing)에 대한 정보 구조(2)는 도 1과 같이 표현될 수 있다. 주소와 길이(Len) 필드는 고정 길이를 가지며 2-4Byte로 표현된다. 저장 데이터는 길이 필드 값의 길이를 가진다. 결국 한 트랜잭션(Transaction)은 위의 자료 형의 연속으로 나타낼 수 있다. 여기서 이전 데이터로 표현되는 이유는 같은 주소에 중복되는 라이팅(Writing)을 처리하기 위해서는 위의 정보는 롤백(Rollback) 정보를 가지고 있기 때문이다. 실제 데이터는 라이팅이 즉시 일어나며 트랜잭션 버퍼(Transaction Buffer)에 저장되는 데이터는 롤백(Rollback) 정보를 가지고 있다. 이는 롤백이 비정상적인 경우에 일어나는 것을 고려하면 처리상 이점을 가진다. 여기에 트랜잭션 버퍼 내의 위치를 나타내기 위한 포인터(Pointer)도 변경되어야 트랜잭션 내의 수정 데이터를 참조 할 수 있으므로 실제 단위 변경 데이터는 2번의 이이피롬 라이팅(EEPROM Writing)이 일어나야 한다.In general, an information structure 2 for one EEPROM writing may be represented as shown in FIG. 1. The address and length fields have a fixed length and are represented by 2-4 bytes. The stored data has the length of the length field value. In the end, a transaction can be represented as a sequence of the above data types. The reason why the previous data is expressed is that the above information has rollback information in order to process writing that is duplicated at the same address. The actual data is written immediately, and the data stored in the transaction buffer has rollback information. This has a processing advantage, considering what happens when rollback is abnormal. In addition, since the pointer to indicate the position in the transaction buffer must be changed to refer to the modified data in the transaction, the actual unit change data must have two EEPROM writings.

int A = 0;int A = 0;

int B = 0;int B = 0;

int C = 0;int C = 0;

Begin_Transaction(); ---------- 도 2Begin_Transaction (); ---------- Figure 2

A = 10; ---------- 도 3A = 10; ---------- Figure 3

B = 20; ---------- 도 4B = 20; ---------- Figure 4

C = A * B; ---------- 도 5C = A * B; ---------- Figure 5

Commit_Trasaction(); ---------- 도 6Commit_Trasaction (); ---------- Figure 6

즉, 각 Transaction은 도 2 내지 도 6과 같이 표현된다.That is, each transaction is represented as shown in FIGS. 2 to 6.

Transaction 시작 시 트랜잭션 스타트 플래그(Transaction Start Flag)(41) 가 Set 된다(도 2). A = 10;이 수행되면 첫 번째 Rollback 정보가 저장되며 이이피롬의 실제 저장 장소(4b)에도 저장된다(도 3). 다음 수행 문도 마찬가지로 수행된다(도 4, 도 5). 즉 A,B,C는 실제저장장소(4b)의 저장영역(31,32,33)에 저장된다. 이후 Commit이 수행되면 Transaction Start Flag(41)가 Reset된다(도 6). Commit은 정상적으로 수행된다는 것을 알 수 있으며, 만약 A = 10; 수행 후 전원이 중단된 경우를 가정하면 Boot Up 루틴 중 Transaction Start Flag(41)를 검사하여 Set 되어 있으면 Transaction 중 비정상적으로 종료 했음을 알 수 있고 이때는 Transaction Buffer의 Rollback 정보를 이용하여 역순으로 이전 값으로 되돌린다. 참조부호 42는 이이피롬 트랜잭션 버퍼(4a)의 트랜잭션 테일 포인터(transaction tail pointer)를 나타낸다. 참조부호 21,22,23은 데이터 구조에 대한 이이피롬 트랜잭션 버퍼영역을 나타낸다.At the start of a transaction, a transaction start flag 41 is set (FIG. 2). When A = 10; is performed, the first rollback information is stored and stored in the actual storage location 4b of Y. pyrom (FIG. 3). The following execution statement is similarly performed (FIGS. 4 and 5). That is, A, B, and C are stored in the storage areas 31, 32, and 33 of the actual storage place 4b. After the Commit is performed, the Transaction Start Flag 41 is reset (FIG. 6). You can see that Commit works normally, if A = 10; Assuming that the power is interrupted after execution, if it is set by checking the Transaction Start Flag (41) during the Boot Up routine, it can be known that the transaction was abnormally terminated. Turn. Reference numeral 42 denotes a transaction tail pointer of the EPROM transaction buffer 4a. Reference numerals 21, 22, and 23 denote EPIROM transaction buffer areas for the data structure.

현재 상기와 같은 트랜잭션 처리를 하는 스마트 카드는 앞으로 점점 더 복잡하고 많은 업무를 처리해야 하는 부담이 있고 한 트랜잭션이 커지는 추세에 있다.Currently, smart cards that process transactions as described above are increasingly complex and burdensome to handle many tasks, and one transaction is increasing.

따라서, 상기한 종래의 이이피롬 트랜잭션 버퍼를 이용한 트랜잭션 수행 방법에 따르면 반드시 이이피롬 라이팅이 수행되어야 하므로 데이터 처리시간이 길어지고 성능이 저하되는 문제점이 있었다.Therefore, according to the conventional method of performing a transaction using EPIROM transaction buffer, since EPIROM writing must be performed, there is a problem in that data processing time is long and performance is degraded.

본 발명의 목적은 램 트랜잭션 버퍼를 사용하여 데이터 처리속도를 높이면서도 데이터의 무결성을 보장할 수 있도록 하는 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법을 제공하는 데 있다.An object of the present invention is to provide a transaction processing method using a RAM transaction buffer to ensure the integrity of the data while increasing the data processing speed using the RAM transaction buffer.

상기한 바와 같은 목적을 달성하기 위한 본 발명의 바람직한 예에 따르면, 씨피유(CPU), 롬(ROM), 램(RAM), 이이피롬(EEPROM)를 포함하여 이루어지는 스마트 카드의 트랜잭션을 처리하기 위한 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법에 있어서, 트랜잭션 시작 신호에 따라 트랜잭션 처리를 시작하는 단계; 트랜잭션 처리 루틴에 따라 입력 혹은 요청된 데이터를 램 트랜잭션 버퍼에 저장하는 단계; 커밋(commit) 트랜잭션 여부를 판단하여 커밋이 발생된 경우 내부 트랜잭션을 수행하는 단계; 및 상기 커밋 트랜잭션 여부 판단 단계에서 커밋이 발생하지 않는 경우 자동 롤백(roolback)처리하는 단계;를 포함하여 이루어진 것을 특징으로 하는 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법이 제공된다.According to a preferred embodiment of the present invention for achieving the above object, a RAM for processing a transaction of a smart card comprising a CPU, a ROM, a RAM, EEPROM A transaction processing method using a transaction buffer, comprising: starting a transaction processing according to a transaction start signal; Storing the input or requested data in a RAM transaction buffer according to a transaction processing routine; Determining whether or not a commit transaction is performed and performing an internal transaction when a commit occurs; And automatic rollback processing when a commit does not occur in the commit transaction determination step. The transaction processing method using the RAM transaction buffer is provided.

바람직하게는, 상기 내부 트랜잭션 수행단계는 램 트랜잭션 버퍼를 검색하는 단계; 상기 램 트랜잭션 버퍼에 데이터가 존재하는 경우 그 데이터를 이이피롬에 저장하는 단계;를 포함하여 이루어진 것을 특징으로 한다.Advantageously, performing said internal transaction comprises: retrieving a RAM transaction buffer; And storing data in the EPIROM if data exists in the RAM transaction buffer.

또한 바람직하게는, 상기 램 트랜잭션 버퍼에 저장되는 데이터 정보 구조는 고정 길이를 가지며 2-4Byte로 표현된 주소와 길이(Len) 필드 및 길이 필드 값의 길이를 가진 저장데이터로 이루어진 것을 특징으로 한다.Also, preferably, the data information structure stored in the RAM transaction buffer may include fixed data, stored data having a length of an address, a length field, and a length field represented by 2-4 bytes.

또한 바람직하게는, 상기 내부 트랜잭션 수행단계는 램 트랜잭션 버퍼를 검색하는 단계; 상기 램 트랜잭션 버퍼에 데이터가 존재하는 경우 그 데이터가 같은 페이지내에 존재하는 지를 판단하는 단계; 상기 데이터가 같은 페이지내에 존재하는 경우 그 데이터를 병합하여 이이피롬에 저장하는 단계;를 포함하여 이루어진 것을 특징으로 한다.Also preferably, the performing of the internal transaction may include searching for a RAM transaction buffer; Determining whether data exists in the same page when data exists in the RAM transaction buffer; And if the data exists in the same page, merging the data and storing the data in YPIROM.

이하 본 발명에 따른 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법을 첨부도면을 통해 상세히 설명한다.Hereinafter, a transaction processing method using a RAM transaction buffer according to the present invention will be described in detail with reference to the accompanying drawings.

도 7은 본 발명에 따른 하나의 램 트랜잭션 버퍼를 이용한 트랜잭션 처리과정에서의 데이터 정보 구조를 나타낸 도면이고, 도 8 내지 도 12는 본 발명에 다른 램 트랜잭션 버퍼를 이용한 트랜잭션 처리과정시 일어나는 램 트랜잭션 버퍼와 실제 저장위치 및 데이터 정보 구조를 나타낸 도면이다.7 is a diagram illustrating a data information structure in a transaction processing process using one RAM transaction buffer according to the present invention, and FIGS. 8 to 12 illustrate a RAM transaction buffer occurring during a transaction process using a RAM transaction buffer according to the present invention. And a diagram showing the actual storage location and data information structure.

램 트랜잭션 버퍼(RAM Transaction Buffer)의 병용 방법How to Use RAM Transaction Buffer Together

본 발명에 따르면 이이피롬(EEPROM Transaction Buffer)와 유사하게 RAM Transaction Buffer(5a)에 저장 되는 데이터 정보 구조(210)도 도 7과 같은 형식으로 표현된다. EEPROM Transaction Buffer와 다른 점은 이후 설명되겠지만, 실제 Commit될 데이터가 저장 되게 되며 실제 저장 장소에는 Commit되기 전에는 변경되지 않는다는 것이다.According to the present invention, similar to the EEPROM Transaction Buffer, the data information structure 210 stored in the RAM Transaction Buffer 5a is also represented in the form as shown in FIG. 7. The difference from the EEPROM Transaction Buffer will be explained later, but the data to be committed will be saved and will not be changed until it is committed.

int A = 0;int A = 0;

int B = 0;int B = 0;

int C = 0;int C = 0;

Begin_Transaction(); ---------- 도 8Begin_Transaction (); ---------- Figure 8

A = 10; ---------- 도 9A = 10; ---------- Figure 9

B = 20; ---------- 도 10B = 20; ---------- Figure 10

C = A * B; ---------- 도 11C = A * B; ---------- Figure 11

Commit_Trasaction(); ---------- 도 12Commit_Trasaction (); ---------- Figure 12

즉, 각 Transaction은 도 8 내지 도 12과 같이 표현된다.That is, each transaction is represented as shown in FIGS. 8 to 12.

여기서 Transaction Buffer(5a), Transaction Start Flag(411)와 Transaction Tail Pointer(412)는 RAM 영역이다. Transaction 시작 시 Transaction Start Flag(411)가 Set 된다(도 8). A = 10;이 수행되면 첫 번째 변경 데이터가 Ram Transaction Buffer(5a)에 저장되며 이이피롬(6a)의 실제 저장 장소는 변경되지 않는다(도 9). 다음 수행 문도 마찬가지로 수행된다(도 10, 도 11). 즉 A,B,C는 이이피롬(6a)의 실제저장장소의 저장영역(61,62,63)에 저장된다. 이후 Commit이 수 행되면 Transaction Start Flag(411)가 Reset되고, Ram Transaction Buffer(5a)에 있는 모든 내용이 이이피롬(6a)의 실제 저장 장소에 Writing 된다(도 12). 단 여기서 Commit시 일어나는 Writing에 대해서도 무결성을 보장해야 하고, 이를 위해 EEPROM Buffer를 이용하여 내부 Transaction처리를 수행한다. 내부 Transaction 처리는 종래 기술에서 언급한 EEPROM Transaction Buffer 방법을 사용한다. 실제 최종적인 변경내용은 EEPROM Buffer를 사용함으로 무결성을 보장한다. 즉 Commit 전까지는 RAM Buffer만을 사용하여 처리하고, Commit시는 다시 EEPROM Buffer를 사용하여 무결성을 보장하는 병용 방법이다. 이제 Rollback을 살려보면, 만약 A = 10; 수행 후 전원이 중단된 경우를 가정하면, 모든 변경 내용은 RAM Transaction Buffer에 저장 되어 있었으므로 아무런 조치를 취하지 안더라도 자동으로 Rollback 된다. 참조부호 211,212,213은 데이터 구조에 대한 램 트랜잭션 버퍼 영역을 나타낸다.Here, the Transaction Buffer 5a, Transaction Start Flag 411 and Transaction Tail Pointer 412 are RAM areas. At the start of a transaction, a Transaction Start Flag 411 is set (FIG. 8). When A = 10; is performed, the first change data is stored in the Ram Transaction Buffer 5a, and the actual storage location of the Y pyrom 6a is not changed (FIG. 9). The following execution statement is similarly performed (FIGS. 10 and 11). That is, A, B and C are stored in the storage areas 61, 62 and 63 of the actual storage place of the Y pyrom 6a. After the Commit is performed, the Transaction Start Flag 411 is reset, and all the contents in the Ram Transaction Buffer 5a are written to the actual storage place of the YPIROM 6a (FIG. 12). However, the integrity of the writing that occurs at the time of commit should be guaranteed. For this, internal transaction processing is performed using EEPROM Buffer. Internal transaction processing uses the EEPROM Transaction Buffer method mentioned in the prior art. The actual final change ensures integrity by using the EEPROM Buffer. In other words, it uses the RAM Buffer until Commit and uses EEPROM Buffer again in Commit to ensure integrity. Now let's look at Rollback, if A = 10; Assuming that the power is cut off after execution, all changes are saved in the RAM Transaction Buffer, so they are automatically rolled back even if no action is taken. Reference numerals 211, 212 and 213 denote RAM transaction buffer areas for data structures.

여기서 EEPROM Transaction Buffer와는 다르게 Transaction내에서 변경된 내용에 대한 참조가 문제가 된다. 아래의 경우를 보면Unlike the EEPROM Transaction Buffer, the reference to the changed contents in the Transaction is a problem. In the following case

int A = 0;int A = 0;

int B = 0;int B = 0;

int C = 0;int C = 0;

Begin_Transaction(); ---------- 도 8Begin_Transaction (); ---------- Figure 8

A = 10; ---------- 도 9A = 10; ---------- Figure 9

B = 20; ---------- 도 10B = 20; ---------- Figure 10

C = A * B; ---------- 도 11C = A * B; ---------- Figure 11

A = A + C; ---------- 도 11과 유사한 과정(S-1)A = A + C; ---------- Process similar to FIG. 11 (S-1)

B = B + C; ---------- 도 11과 유사한 과정(S-2)B = B + C; ---------- Process similar to that of FIG. 11 (S-2)

Commit_Trasaction(); ---------- 도 12와 유사한 과정(S-3)Commit_Trasaction (); ---------- Process similar to FIG. 12 (S-3)

상기 과정 S-1, S-2의 경우, A, B가 변경된 이후에 다시 변경된 경우를 처리하기 위해 캐시 알고리듬(Cache Algorithm)(도시안됨)을 적용하여, Transaction내에 저장장소를 참조하는 경우는 먼저 RAM Transaction Buffer(5a)를 우선적으로 검색하여 해당하는 저장장소가 RAM Transaction Buffer내에 존재하는 경우는 이 값으로 참조한다.In the case of the above steps S-1 and S-2, the cache algorithm (not shown) is applied to handle the case where A and B are changed again. RAM Transaction Buffer (5a) is searched first, and if a corresponding storage location exists in RAM Transaction Buffer, this value is referred to.

성능(Performance) 비교Performance comparison

추가적으로 Ram Buffer를 사용한 Transaction 처리의 경우 기존의 EEPROM Buffer만을 사용했을 경우와 비교하면 하나의 저장 장소에 대해 한번씩만 수정된 경우는 거의 같은 성능을 나타낸다. 그러나 한 Transaction내에서 동일한 저장 장소가 여러 번 변경되는 경우 상당한 성능 향상을 가져온다. 즉 상기 설명한 바와 같은 아래의 경우 In addition, transaction processing using Ram Buffer shows almost the same performance when only one EEPROM Buffer is modified once for one storage location. However, if the same storage location is changed many times in a transaction, a significant performance improvement is obtained. In other words, as described above

int A = 0;int A = 0;

int B = 0;int B = 0;

int C = 0;int C = 0;

Begin_Transaction(); ---------- 도 8Begin_Transaction (); ---------- Figure 8

A = 10; ---------- 도 9A = 10; ---------- Figure 9

B = 20; ---------- 도 10B = 20; ---------- Figure 10

C = A * B; ---------- 도 11C = A * B; ---------- Figure 11

A = A + C; ---------- 도 11과 유사한 과정(S-1)A = A + C; ---------- Process similar to FIG. 11 (S-1)

B = B + C; ---------- 도 11과 유사한 과정(S-2)B = B + C; ---------- Process similar to that of FIG. 11 (S-2)

Commit_Trasaction(); ---------- 도 12와 유사한 과정(S-3)Commit_Trasaction (); ---------- Process similar to FIG. 12 (S-3)

상기 과정 S-1, S-2의 경우, 기존의 EEPROM Buffer 방식으로는 A = A + C;, B = B + C; 두 문장의 변경 데이터를 처리하기 위해서 EEPROM Writing이 발생되지만, RAM Buffer를 추가적으로 사용하면 EEPROM Writing 없이 처리가 가능하다. 일반적으로 스마트 카드가 점점 더 복잡한 업무를 처리하게 되면서 한 Transaction이 커지는 추세로 본다면 Ram Buffer 병용 사용으로 인한 성능향상은 전체 성능향상에 많은 영향을 줄 것이다.In the case of the above process S-1, S-2, A = A + C, B = B + C; EEPROM Writing occurs to process the change data of two sentences, but if RAM Buffer is added, it can be processed without EEPROM Writing. In general, as smart cards are dealing with more and more complex tasks, a transaction grows and the performance improvement due to the use of Ram Buffer together will greatly affect the overall performance.

도 13은 본 발명에 따른 램 트랜잭션 버퍼를 이용한 트랜잭션 처리 과정의 흐름도이다.13 is a flowchart illustrating a transaction processing process using a RAM transaction buffer according to the present invention.

먼저, 스마트 카드의 씨피유(도시안됨)는 트랜잭션의 시작여부를 판단한다(이 과정은 일반적인 카드리더 과정이므로 자세한 설명은 생략하기로 한다)(ST-2). 상기 단계 ST-2에서 만약 트랜잭션 시작으로 판단된 경우에는, 수행되는 결과를 램의 램 트랜잭션 버퍼 영역에 저장한다(ST-4). 이와 같은 과정은 사용자에 의해 정해진 트랜잭션 업무 처리 과정에 따라 계속될 수 있다. 이후 상기 스마트 카드의 씨피유는 커밋(commit) 트랜잭션 여부를 판단한다(ST-6). 만약 커밋 트랜잭션이 수행되지 않는 경우에는 자동 롤백(rollback)과정이 수행된다(st-7).First, the CPI of the smart card (not shown) determines whether to start a transaction (this process is a general card reader process, so a detailed description thereof will be omitted) (ST-2). If it is determined in step ST-2 that the transaction has been started, the result of execution is stored in the RAM transaction buffer area of the RAM (ST-4). This process may continue according to the transaction processing process defined by the user. Thereafter, the CPI of the smart card determines whether or not a commit transaction (ST-6). If the commit transaction is not executed, an automatic rollback process is performed (st-7).

한편 상기 단계 ST-6의 판단결과, 커밋 트랜잭션이 수행되는 경우에는, 캐시 알고리듬(이에 대한 자세한 설명은 생략함)을 적용하여 내부 트랜잭션을 수행한다(ST-8). 상기 단계 ST-8 이후에, 램 트랜잭션 버퍼를 검색하는 과정을 수행한다(ST-10). 이후 상기 램 트랜잭션 버퍼내에 데이터가 존재하는 경우에는 그 데이터를 이이피롬에 저장하는 단계를 수행한다(ST-14). 이로써 트랜잭션 처리가 완료된다.On the other hand, when the commit transaction is performed as a result of the determination of step ST-6, an internal transaction is performed by applying a cache algorithm (a detailed description thereof is omitted) (ST-8). After step ST-8, a process of searching for a RAM transaction buffer is performed (ST-10). Thereafter, if data exists in the RAM transaction buffer, the data is stored in YPIROM (ST-14). This completes transaction processing.

한편, 상기 내부 트랜잭션 수행단계(ST-8)에 있어서, 상기 램 트랜잭션 버퍼에 데이터가 존재하는 경우 그 데이터가 같은 페이지내에 존재하는 지를 판단하는 단계가 추가로 수행될 수 있고, 그 데이터가 같은 페이지내에 존재하는 경우에는 그 데이터를 병합하여 이이피롬에 저장하는 단계를 더 포함한다. 이와 같은 처리는 병합처리라고 하는데, 이는 이이피롬의 특성을 이용한 것이다. 즉, 이이피롬은 페이지(Page)단위로 저장되는 특성이 있다. 이와 같은 페이지내의 주소에 대해서는 1byte를 쓰거나 페이지 전체, 예를 들면 64byte 또는 128byte(회사마다 다름 이에 한정되지 않음)를 쓰더라도 같은 시간이 걸린다. 이와 같은 특성을 이용하여 커밋(commit)을 완료하기 전에 램 트랜잭션 버퍼를 근접하는 주소 즉 같은 페이지내용에 대해 병합처리한다. 도 10의 예에서 실제 저장장소 A,B,C가 같은 페이지내에 있다면 실제 라이팅(Writing)은 한번 만 일어나도록 램 트랜잭션 버퍼를 병합하는 것이다. 커밋 완료전 같은 페이지에 대한 병합처리로 인하여 같은 페이지에 대 한 저장도 상당히 줄어들게 된다. 일반적으로 스마트 카드가 점점 더 복잡한 업무를 처리하게 되면서 한 트랜잭션이 커지는 추세로 본다면 램 버퍼 사용으로 인한 성능향상은 전체 성능향상에 많은 영향을 줄 것이다.Meanwhile, in the internal transaction execution step (ST-8), when data exists in the RAM transaction buffer, a step of determining whether the data exists in the same page may be additionally performed, and the data may be the same page. If present, the method further includes merging the data and storing the data in YPyrom. Such a process is called a merge process, which uses the characteristics of Y. pyrom. That is, YPIROM has a characteristic of being stored in units of pages. It takes the same time to write 1 byte for an address within such a page or to write the whole page, for example, 64 bytes or 128 bytes (not limited to each company). Using this feature, the RAM transaction buffer is merged to the nearest address, that is, the same page content, before the commit is completed. In the example of FIG. 10, if the actual storage locations A, B, and C are in the same page, the actual writing is to merge the RAM transaction buffer so that it occurs only once. Because of the merge process for the same page before the commit is completed, the storage for the same page is also significantly reduced. In general, as smart cards are dealing with more and more complex tasks, and one transaction is growing, the performance improvement from using RAM buffer will greatly affect the overall performance.

상기 설명한 바와같은 본 발명에 따른 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법에 의하면, 종래 이이피롬 트랜잭션 버퍼를 이용한 트랜잭션 처리방법에 비하여 트랜잭션 처리를 위한 이이피롬 라이팅 횟수를 줄임으로써 처리시간을 단축시킬 수 있고 이로 인해 스마트 카드의 성능을 향상시킬 수 있는 효과가 있다.According to the transaction processing method using the RAM transaction buffer according to the present invention as described above, the processing time can be shortened by reducing the number of EPYROM writing for transaction processing as compared to the conventional transaction processing method using EPIROM transaction buffer. Due to this, there is an effect that can improve the performance of the smart card.

한편 상기한 본 발명의 설명에서는 구체적인 실시예에 관해 설명하였으나 여러 가지 변형이 본 발명의 범위를 벗어나지 않고 실시될 수 있다. 따라서 본 발명의 범위는 설명된 실시예에 의하여 정할 것이 아니고 청구범위와 청구범위의 균등한 것에 의하여 정하여져야 할 것이다.Meanwhile, in the above description of the present invention, specific embodiments have been described, but various modifications may be made without departing from the scope of the present invention. Therefore, the scope of the present invention should not be defined by the described embodiments, but by the claims and equivalents of the claims.

Claims (4)

씨피유(CPU), 롬(ROM), 램(RAM), 이이피롬(EEPROM)를 포함하여 이루어지는 스마트 카드의 트랜잭션을 처리하기 위한 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법에 있어서,In the transaction processing method using a RAM transaction buffer for processing a smart card transaction including CPU, ROM, RAM, EEPROM, 트랜잭션 시작 신호에 따라 트랜잭션 처리를 시작하는 단계;Starting transaction processing according to the transaction start signal; 트랜잭션 처리 루틴에 따라 입력 혹은 요청된 데이터를 램 트랜잭션 버퍼에 저장하는 단계;Storing the input or requested data in a RAM transaction buffer according to a transaction processing routine; 커밋(commit) 트랜잭션 여부를 판단하여 커밋이 발생된 경우 내부 트랜잭션을 수행하는 단계; 및Determining whether or not a commit transaction is performed and performing an internal transaction when a commit occurs; And 상기 커밋 트랜잭션 여부 판단 단계에서 커밋이 발생하지 않는 경우 자동 롤백(roolback)처리하는 단계;를 포함하여 이루어진 것을 특징으로 하는 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법.Automatic rollback processing when a commit does not occur in the step of determining whether or not the commit transaction. Transaction processing method using a RAM transaction buffer, characterized in that made. 제 1 항에 있어서, 상기 내부 트랜잭션 수행단계는The method of claim 1, wherein performing the internal transaction 램 트랜잭션 버퍼를 검색하는 단계;  Retrieving a RAM transaction buffer; 상기 램 트랜잭션 버퍼에 데이터가 존재하는 경우 그 데이터를 이이피롬에 저장하는 단계;를 포함하여 이루어진 것을 특징으로 하는 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법.  And storing the data in EPIROM if data exists in the RAM transaction buffer. 제 1 항에 있어서, 상기 램 트랜잭션 버퍼에 저장되는 데이터 정보 구조는 고정 길이를 가지며 2-4Byte로 표현된 주소와 길이(Len) 필드 및 길이 필드 값의 길이를 가진 저장데이터로 이루어진 것을 특징으로 하는 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법.The data information structure stored in the RAM transaction buffer has a fixed length and is composed of stored data having an address represented by 2-4 bytes, a length field, and a length field value. Transaction processing method using RAM transaction buffer. 제 1 항에 있어서, 상기 내부 트랜잭션 수행단계는The method of claim 1, wherein performing the internal transaction 램 트랜잭션 버퍼를 검색하는 단계;Retrieving a RAM transaction buffer; 상기 램 트랜잭션 버퍼에 데이터가 존재하는 경우 그 데이터가 같은 페이지내에 존재하는 지를 판단하는 단계;Determining whether data exists in the same page when data exists in the RAM transaction buffer; 상기 데이터가 같은 페이지내에 존재하는 경우 그 데이터를 병합하여 이이피롬에 저장하는 단계;를 포함하여 이루어진 것을 특징으로 하는 램 트랜잭션 버퍼를 이용한 트랜잭션 처리방법.And merging the data when the data exists in the same page, and storing the data in EPIH. 2.
KR1020060025638A 2006-03-21 2006-03-21 Transcation processing method using a ram transaction buffer KR20070096195A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060025638A KR20070096195A (en) 2006-03-21 2006-03-21 Transcation processing method using a ram transaction buffer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060025638A KR20070096195A (en) 2006-03-21 2006-03-21 Transcation processing method using a ram transaction buffer

Publications (1)

Publication Number Publication Date
KR20070096195A true KR20070096195A (en) 2007-10-02

Family

ID=38803071

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060025638A KR20070096195A (en) 2006-03-21 2006-03-21 Transcation processing method using a ram transaction buffer

Country Status (1)

Country Link
KR (1) KR20070096195A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100858066B1 (en) * 2007-02-28 2008-09-10 주식회사 하이스마텍 Apparatus for processing segmentation of transaction on Javacard and method therefor
KR101455539B1 (en) * 2012-09-20 2014-10-27 가부시끼가이샤 도시바 Ic card and ic card control method
KR20190027312A (en) * 2017-09-06 2019-03-14 삼성전자주식회사 Effective transaction table with page bitmap

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100858066B1 (en) * 2007-02-28 2008-09-10 주식회사 하이스마텍 Apparatus for processing segmentation of transaction on Javacard and method therefor
KR101455539B1 (en) * 2012-09-20 2014-10-27 가부시끼가이샤 도시바 Ic card and ic card control method
KR20190027312A (en) * 2017-09-06 2019-03-14 삼성전자주식회사 Effective transaction table with page bitmap

Similar Documents

Publication Publication Date Title
US10261869B2 (en) Transaction processing using torn write detection
US8271739B2 (en) Memory control apparatus, program, and method
US20110029490A1 (en) Automatic Checkpointing and Partial Rollback in Software Transaction Memory
US11467645B2 (en) Storage device and method for sudden power off recovery thereof
CN111090663A (en) Transaction concurrency control method, device, terminal equipment and medium
US20060129611A1 (en) System and method for recovering data from a file system
WO2020143240A1 (en) Method for quickly recovering data in flash memory database
KR20070096195A (en) Transcation processing method using a ram transaction buffer
EP1510924B1 (en) Apparatus and method for handling transactions with writes and reads to EEPROM or Flash memories
CN111858581A (en) Page query method and device, storage medium and electronic equipment
JP5104653B2 (en) IC card and IC card program
US20030120770A1 (en) Method and apparatus for processing transactions in a data processing system
WO2008078207A2 (en) System and method for recovery of memory transactions
JP4195822B2 (en) IC card and IC card program
KR20010055981A (en) Method for recovering main memory database system using stable memory
CN112698785B (en) Data updating method of storage device
US11625386B2 (en) Fast skip list purge
CN114356949A (en) Method, device and medium for maintaining consistency of cache data
JPH02260082A (en) Computer system
JPH01201747A (en) Canceling system for processed updating system command
TH104757A (en) Reference links to the respective application.
TH60125B (en) Reference links to the respective application.
JPH056294A (en) Dump sampling system

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application