JP2016048575A - Portable electronic device and method of controlling portable electronic device - Google Patents

Portable electronic device and method of controlling portable electronic device Download PDF

Info

Publication number
JP2016048575A
JP2016048575A JP2015234740A JP2015234740A JP2016048575A JP 2016048575 A JP2016048575 A JP 2016048575A JP 2015234740 A JP2015234740 A JP 2015234740A JP 2015234740 A JP2015234740 A JP 2015234740A JP 2016048575 A JP2016048575 A JP 2016048575A
Authority
JP
Japan
Prior art keywords
command
date information
information
card
unit
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.)
Pending
Application number
JP2015234740A
Other languages
Japanese (ja)
Inventor
鈴木 康弘
Yasuhiro Suzuki
康弘 鈴木
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 JP2015234740A priority Critical patent/JP2016048575A/en
Publication of JP2016048575A publication Critical patent/JP2016048575A/en
Pending legal-status Critical Current

Links

Landscapes

  • Credit Cards Or The Like (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a portable electronic device capable of determining validity of a command by simpler processing, and to provide a method of controlling the portable electronic device.SOLUTION: A portable electronic device in one embodiment comprises: a memory for storing first date information; a reception unit for receiving a command transmitted from an external apparatus; an analysis unit for analyzing the command received by the reception unit and obtaining second date information; a comparison unit for performing comparison between the second date information obtained by the analysis unit and the first date information stored in the memory; a determination unit for determining, on the basis of a result of the comparison by the comparison unit, whether or not to execute processing for adding data to the memory on the basis of the command; a command processing unit for executing the addition processing and generating a response to the command, when a determination result of the determination unit shows that the second date information is newer than the first date information; and a transmission unit for transmitting the response generated by the command processing unit to the external apparatus.SELECTED DRAWING: Figure 2

Description

本発明の実施形態は、携帯可能電子装置、及び携帯可能電子装置の制御方法に関する。   Embodiments described herein relate generally to a portable electronic device and a method for controlling the portable electronic device.

一般的に、携帯可能電子装置として用いられるICカードは、プラスチックなどで形成されたカード状の本体と本体に埋め込まれたICモジュールとを備えている。ICモジュールは、ICチップを有している。ICチップは、電源が無い状態でもデータを保持することができるEEPROM(Electrically Erasable Programmable Read−Only Memory)またはフラッシュROMなどの不揮発性メモリと、種々の演算を実行するCPUとを有している。   In general, an IC card used as a portable electronic device includes a card-like main body formed of plastic or the like and an IC module embedded in the main body. The IC module has an IC chip. The IC chip has a nonvolatile memory such as an EEPROM (Electrically Erasable Programmable Read-Only Memory) or a flash ROM that can hold data even in the absence of a power source, and a CPU that executes various operations.

ICカードは、例えば、国際標準規格ISO/IEC7816に準拠したICカードである。ICカードは、携帯性に優れ、且つ、外部装置との通信及び複雑な演算処理を行う事ができる。また、偽造が難しい為、ICカードは、機密性の高い情報などを格納してセキュリティシステム、電子商取引などに用いられることが想定される。   The IC card is, for example, an IC card conforming to the international standard ISO / IEC7816. The IC card is excellent in portability and can perform communication with an external device and complicated calculation processing. Further, since it is difficult to forge, the IC card is assumed to store highly confidential information and be used for a security system, electronic commerce, and the like.

ICカードは、ICカードを処理する処理装置からコマンドを受信した場合、受信したコマンドに応じてアプリケーションを実行する。これにより、ICカードは、種々の機能を実現することができる。   When receiving a command from a processing device that processes the IC card, the IC card executes an application in accordance with the received command. Thereby, the IC card can realize various functions.

特開2009−27774号公報JP 2009-27774 A

ICカードにデータを追記する場合、従来のコマンドでは、ICカードは、受け取ったコマンドに基づく書込みの可否を「ライフサイクル」、または「EFの属性情報」などを用いて判断する。   When data is added to the IC card, in the conventional command, the IC card determines whether or not writing based on the received command is performed using “life cycle”, “EF attribute information”, or the like.

例えば、ICカードに既に記録されているデータに付随する日付情報より古い日付情報がタイムスタンプとしてICカードに書き込まれる場合、ICカードは、書き込みを不可とすることが望ましい。しかし、ICカードは、「ライフサイクル」及び「EFの属性情報」からこのようなデータの正当性をICカード側で判断できない。このような場合、書き込みの可否を端末で判断する必要がある。   For example, when date information older than date information attached to data already recorded on the IC card is written to the IC card as a time stamp, it is desirable that the IC card be unable to write. However, the IC card cannot determine the legitimacy of such data from the “life cycle” and “EF attribute information”. In such a case, it is necessary to determine whether or not writing is possible at the terminal.

端末装置でコマンドの正当性を確認するために、端末装置は、全てのデータを読出し、ICカードに送信するコマンドの日付情報と、読み出したデータの日付情報とを比較する必要がある。この為、コマンドの発行回数及び処理時間などが増加し、処理端末による処理が複雑化するという課題がある。   In order to confirm the validity of the command in the terminal device, the terminal device needs to read all data and compare the date information of the command transmitted to the IC card with the date information of the read data. For this reason, there are problems that the number of command issuances and processing time increase, and the processing by the processing terminal becomes complicated.

そこで、より簡易な処理でコマンドの正当性を判断することができる携帯可能電子装置、及び携帯可能電子装置の制御方法を提供することを目的とする。   Therefore, an object of the present invention is to provide a portable electronic device that can determine the validity of a command by a simpler process, and a method for controlling the portable electronic device.

一実施形態に係る携帯可能電子装置は、入国または出国を示す入出情報、国を示す国コード、及び第1の日付情報を出入国情報として記憶するメモリと、外部機器から送信された前記出入国情報を前記メモリに追記する為のコマンドを受信する受信部と、前記受信部により受信された前記コマンドを解析し、第2の日付情報を取得する解析部と、前記解析部により取得された前記第2の日付情報と、前記メモリにより記憶されている最新の前記出入国情報の前記第1の日付情報とを比較する比較部と、前記第2の日付情報が前記第1の日付情報より新しい場合、前記コマンドに基づいて前記メモリに対して前記出入国情報を追記する追記処理を実行し、前記コマンドに対するレスポンスを生成するコマンド処理部と、前記コマンド処理部により生成された前記レスポンスを前記外部機器に送信する送信部と、を具備する。   The portable electronic device according to one embodiment includes a memory that stores entry / exit information indicating entry / exit, a country code indicating the country, and first date information as entry / exit information, and the entry / exit information transmitted from an external device. A receiving unit that receives a command for appending to the memory; an analysis unit that analyzes the command received by the receiving unit to obtain second date information; and the second that is acquired by the analyzing unit. A comparison unit that compares the date information of the first date information of the latest immigration information stored in the memory, and the second date information is newer than the first date information, A command processing unit that performs a postscript process for adding the immigration information to the memory based on a command, and generates a response to the command; and a command processing unit. The product is the response was and a transmitting unit that transmits to the external device.

図1は、一実施形態に係るICカード処理システムの構成例について説明するための図である。FIG. 1 is a diagram for explaining a configuration example of an IC card processing system according to an embodiment. 図2は、一実施形態に係るICカードの構成例について説明するための図である。FIG. 2 is a diagram for explaining a configuration example of an IC card according to an embodiment. 図3は、一実施形態に係るレコードデータの例について説明するための図である。FIG. 3 is a diagram for describing an example of record data according to an embodiment. 図4は、一実施形態に係るICカード処理システムの処理の例について説明するための図である。FIG. 4 is a diagram for explaining an example of processing of the IC card processing system according to the embodiment. 図5は、一実施形態に係るICカード処理システムの処理の例について説明するための図である。FIG. 5 is a diagram for explaining an example of processing of the IC card processing system according to the embodiment. 図6は、一実施形態に係るICカード処理システムの処理の例について説明するための図である。FIG. 6 is a diagram for explaining an example of processing of the IC card processing system according to the embodiment. 図7は、一実施形態に係るICカード処理システムの処理の例について説明するための図である。FIG. 7 is a diagram for explaining an example of processing of the IC card processing system according to the embodiment. 図8は、一実施形態に係るICカード処理システムの処理の例について説明するための図である。FIG. 8 is a diagram for explaining an example of processing of the IC card processing system according to the embodiment.

以下、図面を参照しながら、一実施形態に係る携帯可能電子装置、及び携帯可能電子装置の制御方法について詳細に説明する。   Hereinafter, a portable electronic device and a control method for the portable electronic device according to an embodiment will be described in detail with reference to the drawings.

本実施形態に係る携帯可能電子装置(ICカード)20及びICカードを処理する処理装置(端末装置)10は、例えば、接触通信、及び/または非接触通信の機能を備える。これにより、ICカード20及び端末装置10は、互いにデータの送受信を行うことができる。   The portable electronic device (IC card) 20 and the processing device (terminal device) 10 for processing the IC card according to the present embodiment have, for example, functions of contact communication and / or non-contact communication. Thereby, the IC card 20 and the terminal device 10 can transmit and receive data to and from each other.

図1は、一実施形態に係るICカード処理システム1の構成例を示す。
ICカード処理システム1は、ICカード20を処理する端末装置10と、ICカード20と、を備える。
FIG. 1 shows a configuration example of an IC card processing system 1 according to an embodiment.
The IC card processing system 1 includes a terminal device 10 that processes the IC card 20 and an IC card 20.

端末装置10は、CPU11、ROM12、RAM13、不揮発性メモリ14、カードリーダライタ15、操作部17、ディスプレイ18、及び電源部19を備える。CPU11、ROM12、RAM13、不揮発性メモリ14、カードリーダライタ15、操作部17、及びディスプレイ18は、それぞれバスを介して互いに接続されている。   The terminal device 10 includes a CPU 11, a ROM 12, a RAM 13, a nonvolatile memory 14, a card reader / writer 15, an operation unit 17, a display 18, and a power supply unit 19. The CPU 11, the ROM 12, the RAM 13, the nonvolatile memory 14, the card reader / writer 15, the operation unit 17, and the display 18 are connected to each other via a bus.

CPU11は、端末装置10全体の制御を司る制御部として機能する。CPU11は、ROM12又は不揮発性メモリ14に記憶されている制御プログラム及び制御データに基づいて種々の処理を行う。例えば、CPU11は、カードリーダライタ15を介してICカード20とコマンド及びレスポンスの送受信を行う。   The CPU 11 functions as a control unit that controls the entire terminal device 10. The CPU 11 performs various processes based on the control program and control data stored in the ROM 12 or the nonvolatile memory 14. For example, the CPU 11 transmits and receives commands and responses to and from the IC card 20 via the card reader / writer 15.

ROM12は、予め制御用のプログラム及び制御データなどを記憶する不揮発性のメモリである。RAM13は、ワーキングメモリとして機能する揮発性のメモリである。RAM13は、CPU11の処理中のデータなどを一時的に格納する。例えば、RAM13は、カードリーダライタ15を介して外部の機器と送受信するデータを一時的に格納する。また、RAM13は、CPU11が実行するプログラムを一時的に格納する。   The ROM 12 is a non-volatile memory that stores a control program and control data in advance. The RAM 13 is a volatile memory that functions as a working memory. The RAM 13 temporarily stores data being processed by the CPU 11. For example, the RAM 13 temporarily stores data to be transmitted / received to / from an external device via the card reader / writer 15. The RAM 13 temporarily stores a program executed by the CPU 11.

不揮発性メモリ14は、例えばEEPROM、FRAMなどを備える。不揮発性メモリ14は、例えば、制御用のプログラム、制御データ、アプリケーション、及びアプリケーションに用いられるデータなどを記憶する。   The nonvolatile memory 14 includes, for example, an EEPROM, an FRAM, and the like. The nonvolatile memory 14 stores, for example, a control program, control data, an application, and data used for the application.

カードリーダライタ15は、ICカード20と通信を行うためのインターフェース装置である。カードリーダライタ15は、接触通信、または非接触通信によりICカード20とデータの送受信を行う。   The card reader / writer 15 is an interface device for communicating with the IC card 20. The card reader / writer 15 transmits / receives data to / from the IC card 20 by contact communication or non-contact communication.

接触通信のインターフェースとして用いられる場合、カードリーダライタ15は、ICカード20が装着されるスロットと、ICカード20が備えるコンタクトパターンと接続される複数の接触端子を備える。   When used as an interface for contact communication, the card reader / writer 15 includes a slot in which the IC card 20 is mounted and a plurality of contact terminals connected to a contact pattern included in the IC card 20.

スロットにICカード20が装着される場合、カードリーダライタ15の複数の接触端子は、ICカード20のコンタクトパターンに接続される。これにより、端末装置10とICカード20とは電気的に接続される。カードリーダライタ15は、スロットに装着されるICカード20に対して、電力の供給、クロックの供給、リセット信号の入力、及びデータの送受信などを行う。   When the IC card 20 is mounted in the slot, the plurality of contact terminals of the card reader / writer 15 are connected to the contact pattern of the IC card 20. Thereby, the terminal device 10 and the IC card 20 are electrically connected. The card reader / writer 15 performs power supply, clock supply, reset signal input, data transmission / reception, and the like to the IC card 20 installed in the slot.

また、非接触通信のインターフェースとして用いられる場合、カードリーダライタ15は、送受信するデータに対して信号処理を施す信号処理部と、所定の共振周波数を有するアンテナとを備える。   When used as an interface for non-contact communication, the card reader / writer 15 includes a signal processing unit that performs signal processing on data to be transmitted and received, and an antenna having a predetermined resonance frequency.

カードリーダライタ15は、例えば、信号処理部により、送受信するデータに対して符号化、復号、変調、及び復調などの信号処理を行なう。また、カードリーダライタ15は、符号化及び変調を施したデータをアンテナに供給する。アンテナは、供給されたデータに応じて磁界を発生させる。これにより、端末装置10は、通信可能範囲に存在するICカード20に対してデータを非接触で送信することができる。   For example, the card reader / writer 15 performs signal processing such as encoding, decoding, modulation, and demodulation on data to be transmitted and received by a signal processing unit. The card reader / writer 15 supplies the encoded and modulated data to the antenna. The antenna generates a magnetic field according to the supplied data. Thereby, the terminal device 10 can transmit data to the IC card 20 existing in the communicable range in a non-contact manner.

さらに、カードリーダライタ15のアンテナは、磁界を検知し、検知した磁界に応じて信号を生成する。これにより、カードリーダライタ15は、信号を非接触で受信することができる。信号処理部は、アンテナにより受信された信号に対して復調及び復号を行う。これにより、端末装置10は、ICカード20から送信された元のデータを取得することができる。   Further, the antenna of the card reader / writer 15 detects a magnetic field and generates a signal according to the detected magnetic field. Thereby, the card reader / writer 15 can receive a signal in a non-contact manner. The signal processing unit demodulates and decodes the signal received by the antenna. Thereby, the terminal device 10 can acquire the original data transmitted from the IC card 20.

操作部17は、例えば操作キーなどを備え、操作者により入力される操作に基づいて、操作信号を生成する。操作部17は、生成した操作信号をCPUに入力する。これにより、CPU11は、操作者により入力された操作に基づいて処理を事項することができる。   The operation unit 17 includes, for example, operation keys and generates an operation signal based on an operation input by the operator. The operation unit 17 inputs the generated operation signal to the CPU. Thereby, CPU11 can matter about processing based on operation inputted by an operator.

ディスプレイ18は、CPU11、または図示されないグラフィックコントローラなどの表示処理モジュールから入力される映像を表示するための信号に基づいて種々の情報を表示する。   The display 18 displays various information based on signals for displaying video input from the CPU 11 or a display processing module such as a graphic controller (not shown).

電源部19は、端末装置10の各部に電力を供給する。電源部19は、例えば、商用電源より電力を受け取り、所定の電圧に変換し、端末装置10の各部に供給する。   The power supply unit 19 supplies power to each unit of the terminal device 10. For example, the power supply unit 19 receives electric power from a commercial power supply, converts it into a predetermined voltage, and supplies it to each unit of the terminal device 10.

図2は、一実施形態に係るICカード20の構成例を示す。
図2に示すように、ICカード20は、例えば、矩形状の本体21と、本体21内に内蔵されたICモジュール22とを備える。ICモジュール22は、ICチップ23と、通信部24とを備える。ICチップ23と通信部24とは、互いに接続された状態でICモジュール22内に形成されている。
FIG. 2 shows a configuration example of the IC card 20 according to one embodiment.
As shown in FIG. 2, the IC card 20 includes, for example, a rectangular main body 21 and an IC module 22 built in the main body 21. The IC module 22 includes an IC chip 23 and a communication unit 24. The IC chip 23 and the communication unit 24 are formed in the IC module 22 while being connected to each other.

なお、本体21は、少なくとも通信部24が配設されるICモジュール22を設置可能な形状であれば、矩形状に限らず如何なる形状であっても良い。   The main body 21 is not limited to a rectangular shape, and may have any shape as long as the IC module 22 in which at least the communication unit 24 is disposed can be installed.

ICチップ23は、通信部24、CPU25、ROM26、RAM27、不揮発性メモリ28、電源部31、及びロジック部32などを備える。通信部24、CPU25、ROM26、RAM27、不揮発性メモリ28、電源部31、及びロジック部32は、バスを介して互いに接続されている。   The IC chip 23 includes a communication unit 24, a CPU 25, a ROM 26, a RAM 27, a nonvolatile memory 28, a power supply unit 31, a logic unit 32, and the like. The communication unit 24, the CPU 25, the ROM 26, the RAM 27, the nonvolatile memory 28, the power supply unit 31, and the logic unit 32 are connected to each other via a bus.

通信部24は、端末装置(外部機器)10のカードリーダライタ15と通信を行うためのインターフェースである。通信部24は、接触通信、または非接触通信により、端末装置10とデータの送受信を行う。   The communication unit 24 is an interface for communicating with the card reader / writer 15 of the terminal device (external device) 10. The communication unit 24 transmits / receives data to / from the terminal device 10 by contact communication or non-contact communication.

接触通信のインターフェースとして用いられる場合、通信部24は、カードリーダライタ15の接触端子と接続されるコンタクトパターンを備える。コンタクトパターンは、導電性を有する金属などによりICモジュール22の表面に形成される接触端子である。即ち、コンタクトパターンは、端末装置10と接触可能に形成されている。   When used as an interface for contact communication, the communication unit 24 includes a contact pattern connected to a contact terminal of the card reader / writer 15. The contact pattern is a contact terminal formed on the surface of the IC module 22 with a conductive metal or the like. That is, the contact pattern is formed so as to be in contact with the terminal device 10.

コンタクトパターンは、金属により形成される面が複数のエリアに区切られて形成される。区切られた各エリアは、それぞれ端子として機能する。通信部24は、コンタクトパターンを介してカードリーダライタ15とデータの送受信を行うことができる。   The contact pattern is formed by dividing a surface formed of metal into a plurality of areas. Each divided area functions as a terminal. The communication unit 24 can transmit / receive data to / from the card reader / writer 15 via the contact pattern.

また、非接触通信のインターフェースとして用いられる場合、通信部24は、信号処理部とアンテナとを備える。   When used as an interface for non-contact communication, the communication unit 24 includes a signal processing unit and an antenna.

信号処理部は、端末装置10に送信するデータに対して符号化、負荷変調などの信号処理を行う。例えば、信号処理部は、端末装置10に送信するデータの変調(増幅)を行う。信号処理部は、信号処理を施したデータをアンテナに供給する。   The signal processing unit performs signal processing such as encoding and load modulation on data to be transmitted to the terminal device 10. For example, the signal processing unit modulates (amplifies) data to be transmitted to the terminal device 10. The signal processing unit supplies the signal-processed data to the antenna.

アンテナは、例えば、ICモジュール22内に所定の形状で配設される金属線により構成される。ICカード20は、端末装置10に送信するデータに応じてアンテナにより磁界を発生させる。これにより、ICカード20は、端末装置10に対してデータを送信することができる。また、ICカード20は、電磁誘導によりアンテナに発生する誘導電流に基づいて端末装置10から送信されるデータを認識する。   The antenna is constituted by, for example, a metal wire disposed in a predetermined shape in the IC module 22. The IC card 20 generates a magnetic field by an antenna according to data transmitted to the terminal device 10. Thereby, the IC card 20 can transmit data to the terminal device 10. Further, the IC card 20 recognizes data transmitted from the terminal device 10 based on an induced current generated in the antenna by electromagnetic induction.

例えば、信号処理部は、アンテナに発生する誘導電流に対して復調、及び復号を行う。例えば、信号処理部は、アンテナにより受信する信号の解析を行う。これにより、通信部24は、2値の論理データを取得する。通信部24は、解析したデータをバスを介してCPU25に送信する。   For example, the signal processing unit demodulates and decodes the induced current generated in the antenna. For example, the signal processing unit analyzes a signal received by the antenna. As a result, the communication unit 24 acquires binary logical data. The communication unit 24 transmits the analyzed data to the CPU 25 via the bus.

CPU25は、ICカード20全体の制御を司る制御部として機能する。CPU25は、ROM26あるいは不揮発性メモリ28に記憶されている制御プログラム及び制御データに基づいて種々の処理を行う。例えば、端末装置10から受信したコマンドに応じて種々の処理を行い、処理結果としてのレスポンスなどのデータの生成を行なう。   The CPU 25 functions as a control unit that controls the entire IC card 20. The CPU 25 performs various processes based on the control program and control data stored in the ROM 26 or the nonvolatile memory 28. For example, various processes are performed in accordance with commands received from the terminal device 10 and data such as responses as processing results is generated.

ROM26は、予め制御用のプログラム及び制御データなどを記憶する不揮発性のメモリである。ROM26は、製造段階で制御プログラム及び制御データなどを記憶した状態でICカード20内に組み込まれる。即ち、ROM26に記憶される制御プログラム及び制御データは、予めICカード20の仕様に応じて組み込まれる。   The ROM 26 is a non-volatile memory that stores a control program and control data in advance. The ROM 26 is incorporated in the IC card 20 in a state where a control program, control data, and the like are stored at the manufacturing stage. That is, the control program and control data stored in the ROM 26 are incorporated in advance according to the specifications of the IC card 20.

RAM27は、ワーキングメモリとして機能する揮発性のメモリである。RAM27は、CPU25の処理中のデータなどを一時的に格納する。例えば、RAM27は、通信部24を介して端末装置10から受信したデータを一時的に格納する。またRAM27は、通信部24を介して端末装置10に送信するデータを一時的に格納する。またさらに、RAM27は、CPU25が実行するプログラムを一時的に格納する。   The RAM 27 is a volatile memory that functions as a working memory. The RAM 27 temporarily stores data being processed by the CPU 25. For example, the RAM 27 temporarily stores data received from the terminal device 10 via the communication unit 24. The RAM 27 temporarily stores data to be transmitted to the terminal device 10 via the communication unit 24. Furthermore, the RAM 27 temporarily stores a program executed by the CPU 25.

不揮発性メモリ28は、例えば、EEPROMあるいはフラッシュROMなどのデータの書き込み及び書換えが可能な不揮発性のメモリを備える。不揮発性メモリ28は、ICカード20の運用用途に応じて制御プログラム及び種々のデータを格納する。   The non-volatile memory 28 includes a non-volatile memory capable of writing and rewriting data, such as an EEPROM or a flash ROM. The nonvolatile memory 28 stores a control program and various data according to the usage application of the IC card 20.

たとえば、不揮発性メモリ28では、プログラムファイル及びデータファイルなどが創成される。創成された各ファイルには、制御プログラム及び種々のデータなどが書き込まれる。CPU25は、不揮発性メモリ28、または、ROM26に記憶されているプログラムを実行することにより、種々の処理を実現することができる。   For example, in the nonvolatile memory 28, a program file and a data file are created. A control program and various data are written in each created file. The CPU 25 can implement various processes by executing programs stored in the nonvolatile memory 28 or the ROM 26.

電源部31は、端末装置10の各部に電力を供給する。ICカード20が接触通信を行う構成を備える場合、電源部31は、通信部24のコンタクトパターンを介してカードリーダライタ15から供給される電力をICカード20の各部に供給する。   The power supply unit 31 supplies power to each unit of the terminal device 10. When the IC card 20 has a configuration for performing contact communication, the power supply unit 31 supplies power supplied from the card reader / writer 15 to each unit of the IC card 20 via the contact pattern of the communication unit 24.

また、ICカード20が非接触通信を行う構成を備える場合、カードリーダライタ15のアンテナから送信される電波、特にキャリア波に基づいて電力を生成する。さらに、電源部31は、動作クロックを生成する。電源部31は、発生させた電力及び動作クロックをICカード20の各部に電力を供給する。ICカード20の各部は、電力の供給を受けた場合、動作可能な状態になる。   In addition, when the IC card 20 has a configuration for performing contactless communication, power is generated based on radio waves transmitted from the antenna of the card reader / writer 15, particularly carrier waves. Furthermore, the power supply unit 31 generates an operation clock. The power supply unit 31 supplies the generated power and operation clock to each unit of the IC card 20. Each unit of the IC card 20 becomes operable when supplied with power.

ロジック部32は、演算処理をハードウエアにより行う演算部である。例えば、ロジック部32は、端末装置10からのコマンドに基づいて、暗号化、復号、及び乱数の生成などの処理を行う。例えば、端末装置10から相互認証コマンドを受信する場合、ロジック部32は、乱数を生成し、生成した乱数をCPU25に伝送する。   The logic unit 32 is an arithmetic unit that performs arithmetic processing by hardware. For example, the logic unit 32 performs processing such as encryption, decryption, and random number generation based on a command from the terminal device 10. For example, when receiving a mutual authentication command from the terminal device 10, the logic unit 32 generates a random number and transmits the generated random number to the CPU 25.

また、不揮発性メモリ28は、レコード構造でデータを記憶する記憶部28aを備えている。記憶部28aは、例えば、図3により示されるデータを記憶する。例えば、ICカード20がIC旅券として用いられる場合、図3により示されるように、記憶部28aは、レコード構造で出入国情報を記憶する。   Further, the nonvolatile memory 28 includes a storage unit 28a that stores data in a record structure. The storage unit 28a stores, for example, data shown in FIG. For example, when the IC card 20 is used as an IC passport, the storage unit 28a stores immigration information in a record structure as shown in FIG.

レコード構造には、固定長順編成構造、可変長順編成構造、または固定長循環順編成構造などの種類が存在する。レコード構造で記憶されるデータは、少なくとも、レコード番号(レコード識別子)と、データの本体(レコードデータ)とを有する。   There are various types of record structures, such as a fixed-length sequential organization structure, a variable-length sequential organization structure, or a fixed-length cyclic sequential organization structure. The data stored in the record structure has at least a record number (record identifier) and a data body (record data).

図3に示される例では、記憶部28aは、Tag Length Value(TLV)構造のデータをレコードデータとして記憶している。即ち、記憶部28aは、レコード番号、データ種別(Tag)、データの長さ(Length)、及びデータ値(Value)を記憶する。   In the example illustrated in FIG. 3, the storage unit 28 a stores data having a Tag Length Value (TLV) structure as record data. That is, the storage unit 28a stores a record number, a data type (Tag), a data length (Length), and a data value (Value).

TLVデータオブジェクトのTagは、ICカード20のCPU25にTLVデータオブジェクトを識別させる為の情報である。Lengthは、TLVデータオブジェクトのValueのデータ長を示す情報である。Valueは、TLVデータオブジェクトのデータ本体である。   Tag of the TLV data object is information for causing the CPU 25 of the IC card 20 to identify the TLV data object. Length is information indicating the value data length of the TLV data object. Value is the data body of the TLV data object.

出入国情報を記憶する場合、記憶部28aは、Valueとして、入出を示す情報(入出情報)、国コード(国記号)、場所コード、及び登録日付(日付情報)を記憶する。   When storing the entry / exit information, the storage unit 28a stores information indicating entry / exit (entry / exit information), a country code (country symbol), a location code, and a registration date (date information) as Value.

入出情報は、1byteのデータである。例えば、入出情報の論理値が「0」である場合、入出情報は、入国を示す。また、入出情報の論理値が「1」である場合、入出情報は、出国を示す。   The entry / exit information is 1-byte data. For example, when the logical value of the entry / exit information is “0”, the entry / exit information indicates entry. When the logical value of the entry / exit information is “1”, the entry / exit information indicates the departure from the country.

国記号は、3byteのデータである。国記号は、例えば、国際標準規格ISO/IEC3166−2により規定される国コードを示す。   The country symbol is 3-byte data. The country symbol indicates, for example, a country code defined by the international standard ISO / IEC3166-2.

場所コードは、3byteのデータである。場所コードは、例えば、「成田」、「羽田」などの場所を示す情報が各国毎にコード化されたものである。なお、本実施形態では、場所コードについて具体的な値を示さない。   The location code is 3-byte data. The location code is, for example, information indicating a location such as “Narita” or “Haneda” coded for each country. In the present embodiment, no specific value is shown for the location code.

日付情報は、8byteのデータである。日付情報は、当該出入国情報がICカード20の不揮発性メモリ28に書き込まれた時刻を示すタイムスタンプである。日付情報は、例えば「yyyymmdd」の形式で書き込まれる。即ち、日付情報は、4バイトの西暦を示す情報、2バイトの月を示す情報、2バイトの日を示す情報を含む。   The date information is 8-byte data. The date information is a time stamp indicating the time when the immigration information is written in the nonvolatile memory 28 of the IC card 20. The date information is written, for example, in the format of “yyyymmdd”. That is, the date information includes information indicating a 4-byte year, information indicating a 2-byte month, and information indicating a 2-byte day.

図3に示される例によると、レコード番号が「01」であるレコードには、入出情報として「1」=出国、国記号として「392」=日本、場所コードとして「xxx」、日付情報として「20091222」が記録されている。   According to the example shown in FIG. 3, the record with the record number “01” includes “1” = exit as the entry / exit information, “392” = Japan as the country symbol, “xxx” as the location code, and “xxx” as the date information. 20009222 "is recorded.

また、端末装置10は、入出情報の値と、「入国」及び「出国」とが対応付けられたテーブルを予め備える。また、端末装置10は、国記号の値と、国名を示す情報とが対応付けられたテーブルを予め備える。また、端末装置10は、場所コードの値と、場所を示す情報とが対応付けられたテーブルを予め備える。またさらに、端末装置10は、日付情報の値に基づいて、出入国情報が記録された時刻を特定する為の手法(またはテーブル)を予め備える。   In addition, the terminal device 10 includes a table in which entry / exit information values are associated with “entrance” and “exit” in advance. In addition, the terminal device 10 includes a table in which country symbol values are associated with information indicating country names. The terminal device 10 includes a table in which a location code value is associated with information indicating a location. Furthermore, the terminal device 10 is previously provided with a method (or table) for specifying the time when the immigration information is recorded based on the value of the date information.

端末装置10は、ICカード20からレコードを読み出した場合、読み出した各情報の値に基づいて、予め記憶している各テーブルを参照することにより、入出情報、国名、場所名、及び日付情報を特定することができる。   When the terminal device 10 reads a record from the IC card 20, the terminal device 10 refers to each table stored in advance based on the value of each read information to obtain the entry / exit information, country name, place name, and date information. Can be identified.

また、不揮発性メモリ28は、CVCA証明書を記憶する記憶部28bを備えている。Card Verifiable Certification Authorities(CVCA)証明書は、ICカード20がIC旅券として用いられる為に必要な情報を含むものである。CVCA証明書は、少なくとも、CVCA証明書の発行日付を示す情報を含む。   In addition, the nonvolatile memory 28 includes a storage unit 28b that stores the CVCA certificate. The Card Verifiable Certification Authority (CVCA) certificate includes information necessary for the IC card 20 to be used as an IC passport. The CVCA certificate includes at least information indicating the issue date of the CVCA certificate.

またさらに、不揮発性メモリ28は、ICカード20の最新の処理日付を記憶する記憶部28cを備える。記憶部28cは、ICカード20がコマンドを端末装置10から受信した場合、受信したコマンドに含まれる日付情報を記憶する。これにより、記憶部28cは、ICカード20が処理された最新(直近)の日付を示す情報(最終処理日付)を記憶することができる。なお、受信するコマンドは、日付情報を含むものであれば如何なるものであってもよい。   Furthermore, the non-volatile memory 28 includes a storage unit 28 c that stores the latest processing date of the IC card 20. When the IC card 20 receives a command from the terminal device 10, the storage unit 28c stores date information included in the received command. Thereby, the memory | storage part 28c can memorize | store the information (last process date) which shows the newest (most recent) date by which the IC card 20 was processed. The received command may be any command as long as it includes date information.

図4は、端末装置10からICカード20に送信されるコマンドの例を示す。図4に示されるコマンドは、「CLA」301、「INS」302、「P1」303、「P2」304、「Lc」305、「Data」306、及び「Le」307を有する。   FIG. 4 shows an example of a command transmitted from the terminal device 10 to the IC card 20. The command shown in FIG. 4 includes “CLA” 301, “INS” 302, “P1” 303, “P2” 304, “Lc” 305, “Data” 306, and “Le” 307.

「CLA」301は、コマンドの層別を示すclass byteである。「INS」302は、コマンドの種別を示すinstruction byteである。「P1」303及び「P2」304は、「INS」302に応じたパラメータを示すparameter byteである。   “CLA” 301 is a class byte indicating the stratification of the command. “INS” 302 is an instruction byte indicating the type of command. “P1” 303 and “P2” 304 are parameter bytes indicating parameters according to “INS” 302.

「Lc」305は、「Data」306のデータの長さ(バイト数)を示すlength field for cording number Ncである。「Data」306は、当該コマンドのデータ本体を示すcommand data fieldである。「Le」307は、当該コマンドに対するレスポンスのデータ長を示すlength field for cording number Neである。   “Lc” 305 is a length field for coding number Nc indicating the data length (number of bytes) of “Data” 306. “Data” 306 is a command data field indicating the data body of the command. “Le” 307 is a length field for coding number Ne indicating the data length of the response to the command.

さらに、「Data」306は、図5に示されるように、複数のTLVデータオブジェクトを含む。   Further, “Data” 306 includes a plurality of TLV data objects as shown in FIG.

図5は、「Data」306に含まれるデータを示す。図5に示されるように、「Data」306は、Tag401、Len402、比較対象403、Tag404、Len405、オフセット406、Tag407、Len408、日付情報409、Tag410、Len411、及び追記データ412を含む。なお、以下、ICカード20に既に記憶されているデータに付随する日付情報を第1の日付情報とし、端末装置10から送信されるコマンドに含まれる日付情報を第2の日付情報として説明する。   FIG. 5 shows data included in “Data” 306. As illustrated in FIG. 5, “Data” 306 includes Tag 401, Len 402, comparison target 403, Tag 404, Len 405, offset 406, Tag 407, Len 408, date information 409, Tag 410, Len 411, and additional data 412. Hereinafter, date information attached to data already stored in the IC card 20 will be described as first date information, and date information included in a command transmitted from the terminal device 10 will be described as second date information.

即ち、「Data」306は、比較対象403を含むTLVデータオブジェクト、抽出オフセット406を含むTLVデータオブジェクト、第2の日付情報409を含むTLVデータオブジェクト、及び追記データ412を含むTLVデータオブジェクトを有する。なお、比較対象403、オフセット406、日付情報409、及び追記データ412がそれぞれ固定長である場合、「Data」306は、TLVデータオブジェクトのValueのみを含む構成であってもよい。   That is, the “Data” 306 includes a TLV data object including the comparison target 403, a TLV data object including the extraction offset 406, a TLV data object including the second date information 409, and a TLV data object including the postscript data 412. When the comparison object 403, the offset 406, the date information 409, and the additional data 412 have fixed lengths, the “Data” 306 may include only the value of the TLV data object.

比較対象403は、ICカード20により記憶されている第1の日付情報の種類を示す情報である。例えば、本実施形態のICカード処理システム1では、例えば、記憶部28aにより記憶されている複数のレコードデータのうちの最新のレコードデータに含まれる日付情報、記憶部28bにより記憶されているCVCA証明書の発行日付、または記憶部28cにより記憶されているICカード20の最終処理日付が、第1の日付情報として用いられる。   The comparison target 403 is information indicating the type of first date information stored in the IC card 20. For example, in the IC card processing system 1 of the present embodiment, for example, date information included in the latest record data among a plurality of record data stored in the storage unit 28a, and CVCA certification stored in the storage unit 28b. The issue date of the document or the final processing date of the IC card 20 stored in the storage unit 28c is used as the first date information.

オフセット406は、このコマンドの日付情報(第2の日付情報)409比較するデータの位置を示す情報である。オフセット406は、比較対象において、最新のレコードデータに含まれる日付情報が第1の日付情報として指定された場合にコマンドに付加される情報である。オフセット406は、レコードの先頭からのバイト数、または、レコードのValueの先頭からのバイト数などを示す。   The offset 406 is information indicating the position of data to be compared with the date information (second date information) 409 of this command. The offset 406 is information added to the command when the date information included in the latest record data is designated as the first date information in the comparison target. The offset 406 indicates the number of bytes from the beginning of the record or the number of bytes from the beginning of the value of the record.

日付情報409は、ICカード20により記憶されている第1の日付情報と比較される第2の日付情報である。   The date information 409 is second date information that is compared with the first date information stored in the IC card 20.

追記データ412は、当該コマンドによりICカード20に追記されるデータ本体である。   The additional write data 412 is a data body that is additionally written to the IC card 20 by the command.

なお、端末装置10及びICカード20は、図6に示されるテーブルに基づいて、比較対象403の生成及び解析を行う。   Note that the terminal device 10 and the IC card 20 generate and analyze the comparison target 403 based on the table shown in FIG.

例えば、比較対象として、CVCA証明書の発行日付を指定する場合、端末装置10は、比較対象403として「0」をセットする。ICカード20は、受信したコマンドの「Data」306の比較対象403が「0」である場合、比較対象としてCVCA証明書の発行日付が指定されていることを認識する。この場合、ICカード20は、記憶部28bにより記憶されているCVCA証明書の発行日付(第1の日付情報)を読み出し、受信したコマンドの日付情報(第2の日付情報)409と比較する。   For example, when a CVCA certificate issuance date is designated as a comparison target, the terminal device 10 sets “0” as the comparison target 403. When the comparison target 403 of the “Data” 306 of the received command is “0”, the IC card 20 recognizes that the issuance date of the CVCA certificate is designated as the comparison target. In this case, the IC card 20 reads the issuance date (first date information) of the CVCA certificate stored in the storage unit 28b and compares it with the date information (second date information) 409 of the received command.

また、例えば、比較対象として、最新のレコードデータに含まれる日付情報を指定する場合、端末装置10は、比較対象403として「1」をセットする。ICカード20は、受信したコマンドの「Data」306の比較対象403が「1」である場合、比較対象として最新のレコードデータに含まれる日付情報が指定されていることを認識する。この場合、ICカード20は、記憶部28aにより記憶されているレコードデータのうちの最新のレコードデータの日付情報(第1の日付情報)を読み出し、受信したコマンドの日付情報(第2の日付情報)409と比較する。   For example, when specifying date information included in the latest record data as a comparison target, the terminal device 10 sets “1” as the comparison target 403. When the comparison target 403 of the “Data” 306 of the received command is “1”, the IC card 20 recognizes that the date information included in the latest record data is specified as the comparison target. In this case, the IC card 20 reads the date information (first date information) of the latest record data from the record data stored in the storage unit 28a, and receives the date information (second date information) of the received command. ) Compare with 409.

なお、この場合、ICカード20は、最新のレコードデータのオフセット406により示される位置から所定長の長さのデータを第1の日付情報として読み出す。   In this case, the IC card 20 reads data having a predetermined length from the position indicated by the offset 406 of the latest record data as the first date information.

また、例えば、比較対象として、最終処理日付を指定する場合、端末装置10は、比較対象403として「2」をセットする。ICカード20は、受信したコマンドの「Data」306の比較対象403が「2」である場合、比較対象として最終処理日付が指定されていることを認識する。この場合、ICカード20は、記憶部28cにより記憶されている最終処理日付(第1の日付情報)を読み出し、受信したコマンドの日付情報(第2の日付情報)409と比較する。   For example, when the final processing date is designated as the comparison target, the terminal device 10 sets “2” as the comparison target 403. When the comparison target 403 of “Data” 306 of the received command is “2”, the IC card 20 recognizes that the final processing date is designated as the comparison target. In this case, the IC card 20 reads the last processing date (first date information) stored in the storage unit 28c and compares it with the date information (second date information) 409 of the received command.

ICカード20は、第2の日付情報が、第1の日付情報より新しい日付である場合、受信したコマンドが正当なコマンドであると判断する。この場合、ICカード20は、受信したコマンドに応じてコマンド処理を行い、正常終了を示すレスポンスを端末装置10に送信する。   When the second date information is newer than the first date information, the IC card 20 determines that the received command is a valid command. In this case, the IC card 20 performs command processing according to the received command, and transmits a response indicating normal termination to the terminal device 10.

また、ICカード20は、第2の日付情報が、第1の日付情報より古い日付である場合、受信したコマンドが不当なコマンドであると判断する。この場合、ICカード20は、受信したコマンドに応じてコマンド処理を行わずに、エラー終了を示すレスポンスを端末装置10に送信する。   In addition, when the second date information is older than the first date information, the IC card 20 determines that the received command is an invalid command. In this case, the IC card 20 transmits a response indicating an error end to the terminal device 10 without performing command processing according to the received command.

図7は、ICカード20が受信するコマンドの例を示す。
例えば、図7に示されるコマンドは、「CLA」、「INS」、「P1」、「P2」、「Lc」、「Data」、及び「Le」を有する。また、この「Data」は、比較対象701、オフセット702、日付情報703、及び追記データ704を含む。図7に示される例では、比較対象701が「1」であり、オフセット702が「8」であり、日付情報703が「20100503」である。
FIG. 7 shows an example of commands received by the IC card 20.
For example, the commands shown in FIG. 7 include “CLA”, “INS”, “P1”, “P2”, “Lc”, “Data”, and “Le”. The “Data” includes a comparison target 701, an offset 702, date information 703, and additional data 704. In the example illustrated in FIG. 7, the comparison target 701 is “1”, the offset 702 is “8”, and the date information 703 is “2013003”.

図7に示されるコマンドを受信する場合、ICカード20は、比較対象が最新レコードデータに含まれる日付であることを認識する。さらに、ICカード20は、記憶部28aにより記憶されている複数のレコードデータのうちの最新のレコードデータを参照し、参照したレコードデータのオフセット702により示される位置のデータを第1の日付情報として読み出す。   When receiving the command shown in FIG. 7, the IC card 20 recognizes that the comparison target is the date included in the latest record data. Further, the IC card 20 refers to the latest record data among the plurality of record data stored in the storage unit 28a, and uses the data at the position indicated by the offset 702 of the referenced record data as the first date information. read out.

さらに、ICカード20は、受信したコマンドの日付情報(第2の日付情報)703と、読み出した第1の日付情報とを比較する。ICカード20は、第2の日付情報が、第1の日付情報より新しい日付である場合、受信したコマンドが正当なコマンドであると判断し、コマンド処理を実行し、正常終了を示すレスポンスを端末装置10に送信する。また、ICカード20は、第2の日付情報が、第1の日付情報より古い日付である場合、受信したコマンドが不当なコマンドであると判断し、エラー終了を示すレスポンスを端末装置10に送信する。   Furthermore, the IC card 20 compares the date information (second date information) 703 of the received command with the read first date information. If the second date information is newer than the first date information, the IC card 20 determines that the received command is a valid command, executes command processing, and sends a response indicating normal termination to the terminal Transmit to device 10. Further, when the second date information is older than the first date information, the IC card 20 determines that the received command is an illegal command and transmits a response indicating an error end to the terminal device 10. To do.

図8は、ICカード20の処理の例を示す。
まず、端末装置10は、比較対象データを決定し、図4及び図5に示されるようなコマンドを生成する。端末装置10は、生成したコマンドをICカード20に送信する。
FIG. 8 shows an example of processing of the IC card 20.
First, the terminal device 10 determines comparison target data and generates a command as shown in FIGS. The terminal device 10 transmits the generated command to the IC card 20.

ICカード20は、端末装置10から送信されたコマンドを受信する(ステップS11)。次に、ICカード20は、受信したコマンドの解析を行う(ステップS12)。これにより、ICカード20は、コマンドにより指定される比較対象、オフセット、及び追記データを認識する。さらに、ICカード20は、第2の日付情報を特定する(ステップS13)。   The IC card 20 receives the command transmitted from the terminal device 10 (step S11). Next, the IC card 20 analyzes the received command (step S12). Thereby, the IC card 20 recognizes the comparison target, offset, and additional data specified by the command. Further, the IC card 20 specifies second date information (step S13).

次に、ICカード20は、認識された比較対象を確認する(ステップS14)。比較対象がCVCA証明書の発行日付である場合、ICカード20は、記憶部28bにより記憶されているCVCA証明書の発行日付(第1の日付情報)を読み出す(ステップS15)。   Next, the IC card 20 confirms the recognized comparison target (step S14). When the comparison target is the issue date of the CVCA certificate, the IC card 20 reads the issue date (first date information) of the CVCA certificate stored in the storage unit 28b (step S15).

また、比較対象が最新のレコードデータに含まれる日付情報である場合、ICカード20は、記憶部28aにより記憶されているレコードデータのうちの最新のレコードデータの日付情報(第1の日付情報)を読み出す(ステップS16)。   When the comparison target is date information included in the latest record data, the IC card 20 uses the date information (first date information) of the latest record data among the record data stored in the storage unit 28a. Is read (step S16).

さらに、比較対象が最終処理日付である場合、ICカード20は、記憶部28cにより記憶されている最終処理日付(第1の日付情報)を読み出す(ステップS17)。   Further, when the comparison target is the final processing date, the IC card 20 reads the final processing date (first date information) stored in the storage unit 28c (step S17).

ICカード20は、読み出した第1の日付情報と、受信したコマンドから認識した第2の日付情報とを比較する(ステップS18)。これにより、ICカード20は、第2の日付情報が第1の日付情報より新しいか否かを判断する(ステップS19)。   The IC card 20 compares the read first date information with the second date information recognized from the received command (step S18). Thereby, the IC card 20 determines whether or not the second date information is newer than the first date information (step S19).

第2の日付情報が第1の日付情報より新しい場合、ICカード20は、受信したコマンドに応じたコマンド処理を実行する(ステップS20)。例えば、受信したコマンドが、図7に示されるようにデータの追記を指示するコマンドである場合、ICカード20は、受信したコマンドの追記データを不揮発性メモリ28の記憶部28aなどに追記する。   If the second date information is newer than the first date information, the IC card 20 executes command processing according to the received command (step S20). For example, when the received command is a command for instructing additional data as shown in FIG. 7, the IC card 20 additionally writes additional data of the received command in the storage unit 28 a of the nonvolatile memory 28.

さらに、ICカード20は、受信したコマンドに含まれる日付情報に基づいて、最終処理日付を更新する(ステップS21)。即ち、ICカード20は、不揮発性メモリ28の記憶部28cにより記憶されている最終処理日付に、受信したコマンドに含まれている日付情報を上書きする。   Furthermore, the IC card 20 updates the final processing date based on the date information included in the received command (step S21). That is, the IC card 20 overwrites the date information included in the received command on the last processing date stored in the storage unit 28c of the nonvolatile memory 28.

ICカード20は、実行したコマンド処理の処理結果に基づいて正常終了を示すレスポンスを生成し(ステップS22)、生成されたレスポンスを端末装置10に送信し(ステップS23)、処理を終了する。   The IC card 20 generates a response indicating normal termination based on the processing result of the executed command processing (step S22), transmits the generated response to the terminal device 10 (step S23), and ends the processing.

また、第2の日付情報が第1の日付情報より古い場合、ICカード20は、コマンド処理を行わずに、エラー終了を示すレスポンスを生成し(ステップS24)、生成されたレスポンスを端末装置10に送信し(ステップS23)、処理を終了する。   If the second date information is older than the first date information, the IC card 20 generates a response indicating an error end without performing the command processing (step S24), and the generated response is sent to the terminal device 10. (Step S23), and the process ends.

この構成によると、ICカード20は、受信したコマンドに含まれる第2の日付情報と、自身が保持する第1の日付情報とに基づいて、受信したコマンドの正当性を判断することができる。ICカード20は、受信したコマンドの正当性が確認された場合にコマンド処理を実行する。これにより、端末装置10における処理を簡易化し、且つコマンドの正当性の確認を行うことができる。この為、コマンドの発行回数及び処理時間などを抑えることができる。   According to this configuration, the IC card 20 can determine the validity of the received command based on the second date information included in the received command and the first date information held by itself. The IC card 20 executes command processing when the validity of the received command is confirmed. Thereby, the process in the terminal device 10 can be simplified and the validity of the command can be confirmed. For this reason, it is possible to reduce the number of times the command is issued and the processing time.

この結果、より簡易な処理でコマンドの正当性を判断することができる携帯可能電子装置、及び携帯可能電子装置の制御方法を提供することができる。   As a result, it is possible to provide a portable electronic device that can determine the validity of a command by a simpler process, and a method for controlling the portable electronic device.

なお、上記の実施形態では、出入国情報は、入出情報、国記号、場所コード、及び日付情報を有する構成として説明したが、この構成に限定されない。出入国情報は、如何なる情報であってもよい。さらに、レコード構造で記憶されているレコードデータは、出入国情報に限られるものではなく、如何なるものであっても、上記の実施形態を実施することができる。   In the above embodiment, the immigration information has been described as a configuration having immigration information, a country symbol, a location code, and date information, but is not limited to this configuration. The immigration information may be any information. Furthermore, the record data stored in the record structure is not limited to the immigration information, and the above-described embodiment can be implemented by any data.

また、上記の実施形態では、端末装置10からICカード20に送信されるコマンドは、比較対象、オフセット、日付情報、及び追記データを備える構成として説明したが、この構成に限定されない。比較対象及びオフセットがICカード20に予め設定されている場合、端末装置10は、少なくとも日付情報を含むコマンドをICカード20に送信すればよい。この場合、ICカード20は、受信したコマンドの日付情報(第2の日付情報)と、自身が記憶する第1の日付情報とに基づいて、コマンドの正当性を確認することができる。また、コマンドの種類も、追記コマンドに限定されるものではなく、少なくとも日付情報を含むコマンドであれば如何なるコマンドであってもよい。   In the above-described embodiment, the command transmitted from the terminal device 10 to the IC card 20 has been described as a configuration including a comparison target, an offset, date information, and additional data, but is not limited to this configuration. When the comparison target and the offset are preset in the IC card 20, the terminal device 10 may transmit a command including at least date information to the IC card 20. In this case, the IC card 20 can confirm the validity of the command based on the date information (second date information) of the received command and the first date information stored by itself. Also, the type of command is not limited to the postscript command, and any command may be used as long as it includes at least date information.

また、上記の実施形態では、ICカード20は、第2の日付情報が第1の日付情報より新しいか否かに基づいて、受信したコマンドの正当性を確認する構成として説明したが、この構成に限定されない。ICカード20は、第2の日付情報により示される日付が、第1の日付情報により示される日付から所定時間経過しているか否かに基づいて、受信したコマンドの正当性を確認する構成であってもよい。これにより、ICカード20は、書き込み後、一定期間次の書き込みを制限することができる。   In the above embodiment, the IC card 20 has been described as a configuration for confirming the validity of the received command based on whether or not the second date information is newer than the first date information. It is not limited to. The IC card 20 is configured to confirm the validity of the received command based on whether or not the date indicated by the second date information has passed a predetermined time from the date indicated by the first date information. May be. Thereby, the IC card 20 can restrict the next writing for a certain period after writing.

またさらに、ICカード20は、コマンドを受信する場合に、過去のレコードデータを参照することにより、所定期間内に当該ICカード20により実行された書き込み処理の回数をカウントする構成であってもよい。この場合、ICカード20は、受信したコマンドの日付情報から過去の所定期間の間に記憶されたレコードデータの件数を確認し、確認した件数が予め設定される所定値以上である場合に、受信したコマンドが不正であると判断する。これにより、ICカード20は、所定期間内に所定値回数以上の書き込みが行われることを制限することができる。   Furthermore, when receiving a command, the IC card 20 may be configured to count the number of write processes executed by the IC card 20 within a predetermined period by referring to past record data. . In this case, the IC card 20 confirms the number of record data stored during the past predetermined period from the date information of the received command, and if the confirmed number is equal to or greater than a predetermined value set in advance, It is determined that the executed command is invalid. Thereby, the IC card 20 can restrict the writing of a predetermined number of times or more within a predetermined period.

なお、上述の各実施の形態で説明した機能は、ハードウエアを用いて構成するに留まらず、ソフトウエアを用いて各機能を記載したプログラムをコンピュータに読み込ませて実現することもできる。また、各機能は、適宜ソフトウエア、ハードウエアのいずれかを選択して構成するものであっても良い。   It should be noted that the functions described in the above embodiments are not limited to being configured using hardware, but can be realized by causing a computer to read a program describing each function using software. Each function may be configured by appropriately selecting either software or hardware.

なお、本発明は上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、上記実施形態に開示されている複数の構成要素の適宜な組み合せにより種々の発明を形成できる。例えば、実施形態に示される全構成要素から幾つかの構成要素を削除してもよい。更に、異なる実施形態に亘る構成要素を適宜組み合せてもよい。   Note that the present invention is not limited to the above-described embodiment as it is, and can be embodied by modifying the constituent elements without departing from the scope of the invention in the implementation stage. Further, various inventions can be formed by appropriately combining a plurality of constituent elements disclosed in the embodiment. For example, some components may be deleted from all the components shown in the embodiment. Furthermore, you may combine suitably the component covering different embodiment.

1…ICカード処理システム、10…端末装置、11…CPU、12…ROM、13…RAM、14…不揮発性メモリ、15…カードリーダライタ、17…操作部、18…ディスプレイ、19…電源部、20…ICカード、21…本体、22…ICモジュール、23…ICチップ、24…通信部、25…CPU、26…ROM、27…RAM、28…不揮発性メモリ、28a乃至28c…記憶部、31…電源部。   DESCRIPTION OF SYMBOLS 1 ... IC card processing system, 10 ... Terminal device, 11 ... CPU, 12 ... ROM, 13 ... RAM, 14 ... Non-volatile memory, 15 ... Card reader / writer, 17 ... Operation part, 18 ... Display, 19 ... Power supply part, DESCRIPTION OF SYMBOLS 20 ... IC card, 21 ... Main body, 22 ... IC module, 23 ... IC chip, 24 ... Communication part, 25 ... CPU, 26 ... ROM, 27 ... RAM, 28 ... Non-volatile memory, 28a thru | or 28c ... Memory | storage part, 31 …Power supply part.

一実施形態に係る携帯可能電子装置は、入国または出国を示す入出情報、国を示す国コード、及び第1の日付情報を含む出入国情報をレコード構造で記憶する第1の記憶部と、最終の処理日付を示す最終処理日付情報を記憶する第2の記憶部と、外部機器から送信されたコマンドを受信する受信部と、前記受信部により受信された前記コマンドを解析し、第2の日付情報を取得する解析部と、前記第1の記憶部により記憶されている最新の前記出入国情報の前記第1の日付情報と前記第2の記憶部により記憶されている前記最終処理日付情報とのいずれかと、前記解析部により取得された前記第2の日付情報と、を比較する比較部と、前記受信部により受信した前記コマンドが前記出入国情報の追記コマンドであり且つ前記第2の日付情報が前記第1の日付情報及び前記最終処理日付情報の前記比較部による比較に用いた一方より新しい場合に前記追記コマンドに基づいて前記出入国情報を前記第1の記憶部に追記する追記処理を実行し、前記受信部により受信した前記コマンドが前記出入国情報の追記コマンドではない場合に前記コマンドに基づいて処理を実行し且つ前記第2の日付情報を用いて前記第2の記憶部により記憶されている前記最終処理日付情報を更新し、前記コマンドに対するレスポンスを生成するコマンド処理部と、前記コマンド処理部により生成された前記レスポンスを前記外部機器に送信する送信部と、を具備する。
A portable electronic device according to an embodiment includes a first storage unit that stores entry / exit information indicating entry or departure, a country code indicating a country, and entry / exit information including first date information in a record structure ; A second storage unit that stores final processing date information indicating a processing date; a receiving unit that receives a command transmitted from an external device; and the command received by the receiving unit; an analysis section for acquiring, any of the first of said first date information and the second of said final processing date information stored in the storage unit of the latest of the immigration information stored in the storage unit or a, a comparator for comparing, with the second date information acquired by the analysis unit, a write-once command and the second date information of the command received by the reception unit is the immigration information When the first date information and the last processing date information are newer than the one used for the comparison by the comparison unit, an additional writing process for adding the entry / exit information to the first storage unit based on the additional writing command is executed. When the command received by the receiving unit is not a command for appending immigration information, the process is executed based on the command and stored in the second storage unit using the second date information. A command processing unit that updates the last processing date information and generates a response to the command; and a transmission unit that transmits the response generated by the command processing unit to the external device.

Claims (5)

入国または出国を示す入出情報、国を示す国コード、及び第1の日付情報を出入国情報として記憶するメモリと、
外部機器から送信された前記出入国情報を前記メモリに追記する為のコマンドを受信する受信部と、
前記受信部により受信された前記コマンドを解析し、第2の日付情報を取得する解析部と、
前記解析部により取得された前記第2の日付情報と、前記メモリにより記憶されている最新の前記出入国情報の前記第1の日付情報とを比較する比較部と、
前記第2の日付情報が前記第1の日付情報より新しい場合、前記コマンドに基づいて前記メモリに対して前記出入国情報を追記する追記処理を実行し、前記コマンドに対するレスポンスを生成するコマンド処理部と、
前記コマンド処理部により生成された前記レスポンスを前記外部機器に送信する送信部と、
を具備する携帯可能電子装置。
A memory for storing entry / exit information indicating entry / exit, country code indicating country, and first date information as entry / exit information;
A receiving unit for receiving a command for adding the immigration information transmitted from an external device to the memory;
Analyzing the command received by the receiving unit and obtaining second date information;
A comparison unit that compares the second date information acquired by the analysis unit with the first date information of the latest immigration information stored in the memory;
A command processing unit that, when the second date information is newer than the first date information, executes a postscript process for adding the immigration information to the memory based on the command, and generates a response to the command; ,
A transmission unit that transmits the response generated by the command processing unit to the external device;
A portable electronic device comprising:
前記コマンド処理部は、前記第2の日付情報が前記第1の日付情報から所定期間経過している場合前記追記処理を実行し、前記コマンドに対するレスポンスを生成する請求項1に記載の携帯可能電子装置。   2. The portable electronic device according to claim 1, wherein the command processing unit executes the write-once process when the second date information has passed a predetermined period from the first date information, and generates a response to the command. apparatus. 前記コマンド処理部は、前記第2の日付情報が前記第1の日付情報より古い場合に前記コマンドに応じた追記処理を実行せず、エラーを示す情報を含むレスポンスを生成する、
請求項1に記載の携帯可能電子装置。
The command processing unit generates a response including information indicating an error without performing an additional recording process according to the command when the second date information is older than the first date information.
The portable electronic device according to claim 1.
前記各部を備えるICモジュールと、
前記ICモジュールが配設される本体と、
を具備する請求項1に記載の携帯可能電子装置。
An IC module comprising the above-mentioned parts;
A main body on which the IC module is disposed;
The portable electronic device according to claim 1, comprising:
メモリを備える携帯可能電子装置に用いられる前記携帯可能電子装置の制御方法であって、
入国または出国を示す入出情報、国を示す国コード、及び第1の日付情報を出入国情報として予め前記メモリに記憶し、
外部機器から送信された前記出入国情報を前記メモリに追記する為のコマンドを受信し、
受信した前記コマンドを解析し、第2の日付情報を取得し、
取得した前記第2の日付情報と、前記メモリにより記憶されている最新の前記出入国情報の前記第1の日付情報とを比較し、
前記第2の日付情報が前記第1の日付情報より新しい場合、前記コマンドに基づいて前記メモリに対して前記出入国情報を追記する追記処理を実行し、前記コマンドに対するレスポンスを生成し、
生成した前記レスポンスを前記外部機器に送信する、
携帯可能電子装置の制御方法。
A method for controlling the portable electronic device used in a portable electronic device comprising a memory, comprising:
Immigration information indicating entry or departure, country code indicating country, and first date information are stored in advance in the memory as entry / exit information,
Receiving a command for adding the immigration information transmitted from an external device to the memory;
Analyzing the received command to obtain second date information;
Comparing the acquired second date information with the first date information of the latest immigration information stored in the memory;
If the second date information is newer than the first date information, an additional writing process is performed to add the immigration information to the memory based on the command, and a response to the command is generated.
Sending the generated response to the external device;
Control method of portable electronic device.
JP2015234740A 2015-12-01 2015-12-01 Portable electronic device and method of controlling portable electronic device Pending JP2016048575A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015234740A JP2016048575A (en) 2015-12-01 2015-12-01 Portable electronic device and method of controlling portable electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015234740A JP2016048575A (en) 2015-12-01 2015-12-01 Portable electronic device and method of controlling portable electronic device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2014034191A Division JP6046068B2 (en) 2014-02-25 2014-02-25 Portable electronic device and method for controlling portable electronic device

Publications (1)

Publication Number Publication Date
JP2016048575A true JP2016048575A (en) 2016-04-07

Family

ID=55649390

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015234740A Pending JP2016048575A (en) 2015-12-01 2015-12-01 Portable electronic device and method of controlling portable electronic device

Country Status (1)

Country Link
JP (1) JP2016048575A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005109209A1 (en) * 2004-05-10 2005-11-17 Matsushita Electric Industrial Co., Ltd. Content use system
JP2009025906A (en) * 2007-07-17 2009-02-05 Toshiba Corp Portable electronic device and data management method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2005109209A1 (en) * 2004-05-10 2005-11-17 Matsushita Electric Industrial Co., Ltd. Content use system
JP2009025906A (en) * 2007-07-17 2009-02-05 Toshiba Corp Portable electronic device and data management method

Similar Documents

Publication Publication Date Title
WO2013042682A1 (en) Ic card, portable electronic device, and ic card control method
JP5490044B2 (en) Portable electronic device and method for controlling portable electronic device
JP2012208910A (en) Portable electronic device and processing system for portable electronic device
JP2011022841A (en) Processing system for portable electronic apparatus, portable electronic apparatus, and processing apparatus for portable electronic apparatus
JP6046068B2 (en) Portable electronic device and method for controlling portable electronic device
JP5823109B2 (en) Portable electronic device and method for controlling portable electronic device
JP2012194698A (en) Portable electronic device, processing device for portable electronic device, and processing system of portable electronic device
JP5892818B2 (en) Portable electronic device and control program for portable electronic device
JP2016048575A (en) Portable electronic device and method of controlling portable electronic device
JP6092342B2 (en) Non-contact portable electronic device and method for issuing non-contact portable electronic device
JP5957577B2 (en) IC card, portable electronic device, and IC card control method
JP5693824B2 (en) IC card processing device, IC card, and IC card processing system
JP5684051B2 (en) Portable electronic device, IC card, and control method for portable electronic device
JP5726659B2 (en) IC card, IC card processing device, and IC card processing system
JP5932588B2 (en) IC card, portable electronic device, and IC card processing device
JP5684059B2 (en) IC card and control method of IC card
EP2942734A1 (en) Data processing apparatus for ic card issuing, ic card issuing apparatus, ic card issuing system, data processing program for ic card issuing, ic card issuing program
JP5677195B2 (en) Portable electronic device and method for controlling portable electronic device
JP5875772B2 (en) Portable electronic device, control method for portable electronic device, and processing system for portable electronic device
JP5784204B2 (en) Portable electronic device and processing system for portable electronic device
JP6178387B2 (en) Electronic device and method for controlling electronic device
JP2012198682A (en) Portable electronic device, processor of portable electronic device, and processing system of portable electronic device
JP5657440B2 (en) Portable electronic device and processing system for portable electronic device
JP2014160499A (en) Portable electronic device and portable electronic device control method
JP5726700B2 (en) IC card and IC card processing method

Legal Events

Date Code Title Description
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160928

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20161011

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161212

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170110

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20170704