WO2018131082A1 - Communication system - Google Patents
Communication system Download PDFInfo
- Publication number
- WO2018131082A1 WO2018131082A1 PCT/JP2017/000539 JP2017000539W WO2018131082A1 WO 2018131082 A1 WO2018131082 A1 WO 2018131082A1 JP 2017000539 W JP2017000539 W JP 2017000539W WO 2018131082 A1 WO2018131082 A1 WO 2018131082A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- server
- command
- data
- reader
- data update
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/16—Error detection or correction of the data by redundancy in hardware
- G06F11/20—Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
Definitions
- the present invention relates to a communication system.
- Patent Documents 1 and 2 A communication system in which a server on a network controls a user device via a reader / writer has been proposed (see Patent Documents 1 and 2). Further, a communication system has been proposed in which a user device executes a predetermined process and returns a response to the reader / writer based on a command from the reader / writer (see Patent Document 3).
- a server on a network controls a user device via a reader / writer
- synchronization replication
- the processing for the user device may not be correctly transferred from the normal server to the spare server.
- a communication system including a first server and a second server, wherein the first server is connected to the second server and a reader / writer via a network, and transmits data update information to the second server.
- the command and accompanying information of the command are transmitted to the user device via the reader / writer, and the second server connects the reader / writer with a network.
- the data update information is received from the first server, the data in the second server is updated based on the received data update information, and after the update, from the first server
- the switch to the second server occurs, the command and the accompanying information of the command are sent via the reader / writer based on the data in the second server.
- Communication system for transmitting to over laser device.
- FIG. 1 is a schematic diagram illustrating a configuration of a communication system 1 according to a first embodiment.
- 3 is a schematic diagram for explaining data in a first server 30.
- FIG. 4 is a schematic diagram for explaining data in a second server 40.
- FIG. 6 is a sequence diagram illustrating an operation example of the communication system 1 according to the first embodiment.
- FIG. 1 is a schematic diagram illustrating a configuration of a communication system 1 according to the first embodiment.
- the communication system 1 according to the first embodiment is a communication system including a first server 30 and a second server 40, and the first server 30 includes a second server 40, a reader / writer 22, 24, the data update information is transmitted to the second server 40, the data update information is transmitted to the second server 40, and then the user device is connected via the reader / writers 22 and 24.
- the second server 40 when the second server 40 is connected to the reader / writers 22 and 24 via the network 50 and receives data update information from the first server 30, When the data in the second server 40 is updated based on the received data update information, and the switching from the first server 30 to the second server 40 occurs after the update, the second server Based on the data in the 0 and accompanying information command and the command is a communication system that transmits to the user device 12, 14 through the reader-writer 22. Details will be described below.
- the user devices 12 and 14 include, for example, an IC chip and a storage device, and data such as a balance of electronic money is stored in the storage device.
- the data stored in the storage devices of the user devices 12 and 14 can be updated by the user devices 12 and 14 executing a command, for example.
- the reader / writers 22 and 24 are devices for reading and writing data in the user devices 12 and 14, and are composed of, for example, a supermarket cash register device or a station ticket gate.
- the number of user devices and reader / writers is not particularly limited. In this embodiment, it is assumed that two user devices 12 and 14 and two reader / writers 22 and 24 are arranged in the communication system 1.
- the first server 30 is connected to the second server 40 and the reader / writers 22 and 24 via the network 50.
- the network 50 is, for example, the Internet.
- the first server 30 includes a CPU, a memory, and the like, and operates when the CPU executes a program stored in the memory. Data is stored in the memory of the first server 30.
- the first server 30 transmits a command and accompanying information of the command to the user devices 12 and 14 based on the data in the first server 30.
- the accompanying information of the command includes a sequence number and an execution number. In the present embodiment, it is assumed that both the sequence number and the execution number are included in the accompanying information of the command.
- FIG. 2 is a schematic diagram for explaining data in the first server 30.
- the data in the first server 30 is stored in a table format, for example.
- the table has records, and the record has fields of record number, command, sequence number, execution number, session key, reader / writer number, status, and update time. Records are updated by adding new records.
- Each data stored in the record is preferably encrypted. Encryption can be performed by, for example, a symmetric key system such as AES or DES, or an asymmetric key system such as RSA or ECC.
- a record number is stored in the record number field.
- the record number is a number for identifying the record.
- the first server 30 and the second server 40 can generate a record number when adding a record, for example.
- the sequence number is stored in the sequence number field.
- the sequence number is a number for identifying a sequence in one session. For example, if sequence number 0001 is assigned to one sequence in a session, 0002 can be assigned to the next sequence and 0003 can be assigned to the next sequence.
- the command number It is possible to easily determine whether or not the response is transmitted from the outside illegally.
- the execution number is stored in the execution number field.
- the execution number is a number with a different value for each command. For example, if the execution number 00AA is assigned to the command 1, the next command 2 can be assigned the execution number 00AB.
- the same execution number as the number assigned previously is assigned. In this way, when the command is retransmitted from the server by negotiating the protocol that the command having the same execution number is not executed between the server and the user device, the user device 12, 14 is changed to the user device 12, 14 is prevented from being updated twice in error.
- the session key is stored in the session key field.
- the session key is data generated when the user devices 12 and 14 and the first server 30 perform mutual authentication for each session.
- the session key is stored in the first server 30 and the user devices 12 and 14 after generation.
- the session key generated for one session is valid only for that one session.
- Data transmitted and received between the user devices 12 and 14 and the first server 30 can be encrypted with a session key including a command and accompanying information of the command.
- the session key can be generated according to a symmetric key system such as AES or DES, or an asymmetric key system such as RSA or ECC.
- the reader / writer number is stored in the reader / writer number field.
- the reader / writer number is a number for identifying the reader / writer.
- the status is stored in the status field.
- the status can include, for example, Ready and Wait. “Ready” indicates a state in which a command is ready to be transmitted from the server to the user device, and “Wait” indicates a state in which the user device is waiting for a response.
- the update time field stores the time when the record was added.
- the first server 30 transmits data update information to the second server 40 before transmitting the command. Then, the first server 30 transmits a command and accompanying information of the command to the user devices 12 and 14 via the reader / writers 22 and 24 with the data update completion notification from the second server 40 as a trigger. For example, first, the first server 30 identifies a record whose status is Ready from the table in the first server 30, and changes the status of the identified record from Ready to Wait. Next, the first server 30 includes the data included in the record whose status is changed in the data update information and transmits the data update information to the second server 40.
- the first server 30 uses the notification as a trigger to store the command and accompanying information (eg, sequence) stored in the record whose status has been changed. Number and execution number) with the session key of the record whose status has been changed, and this is encrypted via the reader / writers 22 and 24 identified by the reader / writer number of the record whose status has been changed, 14 is transmitted.
- command and accompanying information eg, sequence
- the first server 30 When the first server 30 does not receive a response from the user devices 12 and 14 within a predetermined time after transmitting the command, the first server 30 transmits (retransmits) the command and the accompanying information of the command again. Note that “transmission” in this specification includes transmission (retransmission) again in addition to transmission for the first time.
- the second server 40 is connected to the first server 30 and the reader / writers 22 and 24 via the network 50.
- the second server 40 includes a CPU, a memory, and the like, and operates when the CPU executes a program stored in the memory. Data is stored in the memory of the second server 40.
- FIG. 3 is a schematic diagram for explaining data in the second server 40.
- the data in the second server 40 is stored in a table format in the same manner as the data in the first server 30.
- the table has records.
- the data stored in the record, the encryption of the record, and the like are the same as in the case of the first server 30 and will not be described.
- the second server 40 When the second server 40 receives the data update information from the first server 30, the second server 40 updates the data in the second server 40 based on the received data update information. Thereby, the data in the second server 40 is synchronized with the data in the first server 30. Data update is performed by adding a new record, and each data included in the data update information is stored in each field in the new record.
- the second server 40 transmits a data update completion notification to the first server 30 after the data update.
- the data update completion notification is a notification indicating that the data update is completed.
- the second server 40 When the second server 40 switches from the first server 30 to the second server 40 after the data in the second server 40 is updated, the second server 40 attaches a command and a command based on the data in the second server 40.
- Information is transmitted to the user devices 12 and 14 via the reader / writers 22 and 24. That is, the second server 40 takes charge of the processing for the user devices 12 and 14 instead of the first server 30 when switching from the first server 30 to the second server 40 occurs. Transmission from the second server 40 is performed based on data in the second server 40. Since the data in the second server 40 is kept up-to-date based on the data update information received from the first server 10, the command transmitted by the second server 40 is transmitted by the first server 30. Done in the same way.
- the cause of switching is not particularly limited. As an example, switching occurs when a failure occurs in the first server 30 or when the first server 30 is overloaded.
- FIG. 4 is a sequence diagram illustrating an operation example of the communication system 1 according to the first embodiment.
- an operation example of the communication system 1 according to the first embodiment will be described with reference to FIG.
- Step S11 the first server 30 updates data in the first server 30.
- the data is updated by adding a new record to the table in the first server 30.
- Step S12 the first server 30 transmits data update information to the second server 40 before transmitting the command.
- the first server 30 identifies a record whose status is Ready from the table in the first server 30, and changes the status of the identified record from Ready to Wait.
- the first server 30 includes the data included in the record whose status is changed in the data update information and transmits the data update information to the second server 40.
- the second server 40 updates the data in the second server 40 based on the data update information received from the first server 30.
- the data is updated by adding a new record to the table in the second server 40 based on the data update information, for example.
- Data included in the received data update information is stored in each field of the newly added record.
- the second server 40 adds a new record if the table in the second server 40 includes a record having an update time that is newer than the update time included in the received data update information.
- the received data update information can be discarded.
- Step S14 Next, the second server 40 transmits a data update completion notification to the first server 30.
- Step S15, Step S16 the first server 30 transmits a command and accompanying information of the command to the user devices 12 and 14 via the reader / writers 22 and 24 with the data update completion notification from the second server 40 as a trigger.
- Step S19 the user device 12 transmits a response indicating that the data update has been normally completed to the first server 30.
- the user device 12 encrypts this response with a session key generated by mutual authentication with the first server 30 before transmitting the response.
- Step S20 Next, it is assumed that a failure occurs in the first server 30 and processing for the user devices 12 and 14 is taken over from the first server 30 to the second server 40.
- the processing for the user devices 12 and 14 is handled not by the first server 30 but by the second server 40 thereafter.
- the second server 40 transmits polling to the first server 30 at a predetermined interval, and when the first server 30 does not respond to the polling, it is determined that a failure has occurred in the first server 30.
- the processing can be taken over from the first server 30.
- the second server 40 receives an instruction to take over from a load sharing device (load balancer) that monitors the load of the first server 30 and the second server 40, according to the received instruction, The processing of the first server 30 can be taken over.
- load sharing device load balancer
- Step S21, Step S22 the second server 40 determines whether or not a response has arrived within a predetermined time from the user devices 12 and 14 based on the data in the second server 40 (step S21). 2 Update the data in the server 40 (step S22).
- the second server 40 determines that no response has been received from the user device 12 within a predetermined time, and updates the data in the second server 40.
- the determination of whether or not the response has arrived is performed by, for example, identifying a record whose status is Wait among the records stored in the table in the second server 40 and determining a predetermined time from the update time of the identified record. This can be done by judging whether or not.
- the sequence number is regularly incremented from 0002 to 0003 according to a predetermined protocol, but since the execution number is 00AA which is the same as the execution number of the command that has already updated the data, the data update condition is satisfied. Shall not. Therefore, the data update by the user device 12 is not performed.
- the user device 12 uses the execution number received from the second server 40 as the stored execution number. It is possible to easily determine whether or not the execution number is the same as the execution number of the command that has already updated the data.
- Step S27, Step S28 the user device 12 transmits a response to the data update to the second server 40.
- the user device 12 encrypts the response with the session key generated by mutual authentication with the first server 30 before transmitting the response.
- synchronization (replication) of the first server 30 and the second server 40 is performed at an appropriate timing. That is, before the command is transmitted from the first server 30 to the user devices 12 and 14, the data update information is transmitted from the first server 30 to the second server 40, and the data in the first server 30 and the second Data in the server 40 is synchronized (replicated). Therefore, even if a switch from the first server 30 to the second server 40 occurs after transmitting a command from the first server 30 to the user devices 12, 14, the user device 12, 14 can be correctly taken over.
- the communication system 1 includes two servers, the first server 30 and the second server 40, but the communication system 1 may include three or more servers.
- the third and subsequent servers can be operated in the same manner as the second server 40 described above, for example. Further, for example, the third and subsequent servers can take over the process of the second server 40 by the same method as the case of taking over the process of the first server 30 instead of the first server 30.
- Comparative Example 1 As Comparative Example 1, a communication system in which data update information is transmitted from the first server 30 to the second server 40 after one second has elapsed after the command is transmitted from the first server 30 to the user devices 12 and 14. consider. In the first comparative example, after the command is transmitted from the first server 30 to the user devices 12 and 14, the first server 30 fails before the data update information is transmitted from the first server 30 to the second server 40. It is assumed that switching from the first server 30 to the second server 40 occurs.
- the user apparatus 12 since the sequence number is not correctly transferred, the user apparatus 12 determines that the data update condition is not satisfied in step S25 described above, and updates the data in the user apparatus 12. Step S26 is not executed.
- step S26 since the execution number is not taken over correctly, if the data update in step S26 is executed, the balance of electronic money stored in the user device 12 has already been increased by 100 yen. It will be increased by 100 yen again.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Hardware Redundancy (AREA)
- Financial Or Insurance-Related Operations Such As Payment And Settlement (AREA)
Abstract
Description
本発明は通信システムに関する。 The present invention relates to a communication system.
ネットワーク上のサーバがリーダライタを介してユーザ装置を制御する通信システムが提案されている(特許文献1、2参照)。また、リーダライタからのコマンドに基づき、ユーザ装置が所定の処理を実行してレスポンスをリーダライタに返す通信システムが提案されている(特許文献3参照)。
A communication system in which a server on a network controls a user device via a reader / writer has been proposed (see
ネットワーク上のサーバがリーダライタを介してユーザ装置を制御する通信システムにおいては、サーバがデータを送受信できなくなる事態に備えて、予備のサーバを設けておくことが好ましい。しかしながら、通常時のサーバと予備のサーバの同期(レプリケーション)が適切なタイミングで行なわれない場合には、ユーザ装置に対する処理が通常時のサーバから予備のサーバへ正しく引き継がれない虞がある。 In a communication system in which a server on a network controls a user device via a reader / writer, it is preferable to provide a spare server in preparation for a situation where the server cannot transmit or receive data. However, if synchronization (replication) between the normal server and the spare server is not performed at an appropriate timing, the processing for the user device may not be correctly transferred from the normal server to the spare server.
上記の課題は、例えば、次の手段により解決することができる。 The above problem can be solved by, for example, the following means.
第1サーバと第2サーバを備えた通信システムであって、前記第1サーバは、前記第2サーバとリーダライタにネットワークを介して接続され、データ更新情報を前記第2サーバに対して送信し、前記データ更新情報を前記第2サーバに対して送信した後、前記リーダライタを介してユーザ装置に対しコマンドとコマンドの付随情報とを送信し、前記第2サーバは、前記リーダライタにネットワークを介して接続され、前記第1サーバから前記データ更新情報を受信した場合に、前記受信したデータ更新情報に基づいて前記第2サーバ内のデータを更新し、前記更新後、前記第1サーバから前記第2サーバへの切り替えが生じた場合、前記第2サーバ内のデータに基づいてコマンドとコマンドの付随情報とを前記リーダライタを介して前記ユーザ装置に対し送信する通信システム。 A communication system including a first server and a second server, wherein the first server is connected to the second server and a reader / writer via a network, and transmits data update information to the second server. After transmitting the data update information to the second server, the command and accompanying information of the command are transmitted to the user device via the reader / writer, and the second server connects the reader / writer with a network. And when the data update information is received from the first server, the data in the second server is updated based on the received data update information, and after the update, from the first server When the switch to the second server occurs, the command and the accompanying information of the command are sent via the reader / writer based on the data in the second server. Communication system for transmitting to over laser device.
第1サーバと第2サーバの同期が適切なタイミングで行われ、ユーザ装置に対する処理が第1サーバから第2サーバへ正しく引き継がれる通信システムを提供することができる。 It is possible to provide a communication system in which synchronization between the first server and the second server is performed at an appropriate timing, and processing for the user device is correctly transferred from the first server to the second server.
[実施形態1に係る通信システム1の構成]
図1は実施形態1に係る通信システム1の構成を示す模式図である。図1に示すように、実施形態1に係る通信システム1は、第1サーバ30と第2サーバ40を備えた通信システムであって、第1サーバ30は、第2サーバ40とリーダライタ22、24とにネットワーク50を介して接続され、データ更新情報を第2サーバ40に対して送信し、データ更新情報を第2サーバ40に対して送信した後、リーダライタ22、24を介してユーザ装置12、14に対しコマンドとコマンドの付随情報とを送信し、第2サーバ40は、リーダライタ22、24にネットワーク50を介して接続され、第1サーバ30からデータ更新情報を受信した場合に、受信したデータ更新情報に基づいて第2サーバ40内のデータを更新し、更新後、第1サーバ30から第2サーバ40への切り替えが生じた場合、第2サーバ40内のデータに基づいてコマンドとコマンドの付随情報とをリーダライタ22、24を介してユーザ装置12、14に対し送信する通信システムである。以下、詳細に説明する。
[Configuration of
FIG. 1 is a schematic diagram illustrating a configuration of a
(ユーザ装置12、14、リーダライタ22、24)
ユーザ装置12、14には例えば非接触ICカード(Contactless smart cards)やスマートフォンなどを用いることができる。ユーザ装置12、14とリーダライタ22、24との間の通信は例えば近距離無線通信方式(Near Field Communication)に従って行なわれる。ユーザ装置12、14は例えばICチップと記憶装置を備えており、記憶装置には例えば電子マネーの残高などのデータが記憶されている。ユーザ装置12、14の記憶装置に記憶されているデータは、ユーザ装置12、14が例えばコマンドを実行することにより更新することができる。リーダライタ22、24は、ユーザ装置12、14内のデータを読み書きする装置であり、例えばスーパーマーケットのレジ装置や駅の改札機などからなる。ユーザ装置やリーダライタの数は特に限定されないが、本実施形態では、2台のユーザ装置12、14と2台のリーダライタ22、24が通信システム1に配置されているものとする。
(
For the
(第1サーバ30)
第1サーバ30はネットワーク50を介して第2サーバ40とリーダライタ22、24に接続されている。ネットワーク50は例えばインターネットである。第1サーバ30はCPUやメモリなどを備えており、CPUがメモリなどに記憶されているプログラムを実行することにより動作する。第1サーバ30のメモリにはデータが記憶されている。第1サーバ30は、第1サーバ30内のデータに基づいてユーザ装置12、14に対しコマンド及びコマンドの付随情報を送信する。コマンドの付随情報にはシーケンス番号や実行番号などが含まれる。本実施形態では、シーケンス番号と実行番号の双方がコマンドの付随情報に含まれるものとする。
(First server 30)
The
図2は第1サーバ30内のデータを説明する模式図である。図2に示すように、第1サーバ30内のデータは例えばテーブル形式で記憶される。テーブルはレコードを有しており、レコードはレコード番号、コマンド、シーケンス番号、実行番号、セッション鍵、リーダライタ番号、ステータス、及び更新時刻のフィールドを有している。レコードの更新は新たなレコードを追加することにより行なわれる。レコードに格納される各データは暗号化されていることが好ましい。暗号化は例えばAESやDESなどの対称鍵方式やRSAやECCなどの非対称鍵方式により行うことができる。
FIG. 2 is a schematic diagram for explaining data in the
<レコード番号のフィールド>
レコード番号のフィールドにはレコード番号が格納される。レコード番号はレコードを識別する番号である。第1サーバ30や第2サーバ40は例えばレコードを追加する際にレコード番号を生成することができる。
<Record number field>
A record number is stored in the record number field. The record number is a number for identifying the record. The
<コマンドのフィールド>
コマンドのフィールドにはコマンドが格納される。コマンドには、例えば、「電子マネーの残高を100円増額する」や「電子マネーの残高を100円減額する」などがある。どのような値でコマンドを符号化するのかは、第1サーバ30とユーザ装置12、14との間で予め取り決められたプロトコルに従う。例えば、「電子マネーの残高を100円増額する」=U¥100、「電子マネーの残高を100円減額する」=D¥100などと取り決めることができる。
<Command field>
Commands are stored in the command field. Examples of the command include “increase electronic money balance by 100 yen” and “decrease electronic money balance by 100 yen”. What value is used to encode the command depends on a protocol determined in advance between the
<シーケンス番号のフィールド>
シーケンス番号のフィールドにはシーケンス番号が格納される。シーケンス番号は一のセッション内のシーケンスを識別する番号である。例えば、あるセッションにおける一のシーケンスにシーケンス番号0001を割り当てたとすると、次のシーケンスには0002を割り当て、その次のシーケンスには0003を割り当てることができる。シーケンス番号を用いれば、シーケンス番号の値が規則正しく変化しているかどうかを判断することにより(上記の例ではシーケンスごとにシーケンス番号が一つずつインクリメントされているかどうかを判断することにより)、コマンドやレスポンスが外部から不正に送信されたものであるかどうかなどを容易に判断することができる。
<Sequence number field>
The sequence number is stored in the sequence number field. The sequence number is a number for identifying a sequence in one session. For example, if sequence number 0001 is assigned to one sequence in a session, 0002 can be assigned to the next sequence and 0003 can be assigned to the next sequence. By using a sequence number, by determining whether the value of the sequence number changes regularly (in the above example, by determining whether the sequence number is incremented by one for each sequence), the command number It is possible to easily determine whether or not the response is transmitted from the outside illegally.
<実行番号のフィールド>
実行番号のフィールドには実行番号が格納される。実行番号はコマンドごとに値が異なる番号である。例えば、コマンド1に対して実行番号00AAを割り当てたとすると、次のコマンド2には実行番号00ABを割り当てることができる。なお、一度送信したコマンドを再送する場合には先に割り当てた番号と同じ実行番号を割り当てるものとする。このようにすれば、同じ実行番号のコマンドは実行しないとのプロトコルをサーバとユーザ装置との間で取り決めることにより、コマンドがサーバから再送される場合において、ユーザ装置12、14がユーザ装置12、14内のデータを誤って二重に更新することが防止される。
<Run number field>
The execution number is stored in the execution number field. The execution number is a number with a different value for each command. For example, if the execution number 00AA is assigned to the
<セッション鍵のフィールド>
セッション鍵のフィールドにはセッション鍵が格納される。セッション鍵は、ユーザ装置12、14と第1サーバ30とがセッションごとに相互認証を行うことにより生成されるデータである。セッション鍵は、生成後、第1サーバ30とユーザ装置12、14とに記憶される。一のセッション用に生成されたセッション鍵は、当該一のセッションに限り有効である。ユーザ装置12、14と第1サーバ30との間で送受信されるデータは、コマンド及びコマンドの付随情報を含め、セッション鍵により暗号化することができる。セッション鍵は例えばAESやDESなどの対称鍵方式やRSAやECCなどの非対称鍵方式に従い生成することができる。
<Session key field>
The session key is stored in the session key field. The session key is data generated when the
<リーダライタ番号のフィールド>
リーダライタ番号のフィールドにはリーダライタ番号が格納される。リーダライタ番号はリーダライタを識別する番号である。
<Reader / writer number field>
The reader / writer number is stored in the reader / writer number field. The reader / writer number is a number for identifying the reader / writer.
<ステータスのフィールド>
ステータスのフィールドにはステータスが格納される。ステータスには例えばReadyとWaitを含めることができる。Readyはサーバからユーザ装置にコマンドを送信する準備ができている状態を示し、Waitはユーザ装置のレスポンスを待っている状態を示す。
<Status field>
The status is stored in the status field. The status can include, for example, Ready and Wait. “Ready” indicates a state in which a command is ready to be transmitted from the server to the user device, and “Wait” indicates a state in which the user device is waiting for a response.
<更新時刻のフィールド>
更新時刻のフィールドにはレコードを追加した時刻が格納される。
<Update time field>
The update time field stores the time when the record was added.
第1サーバ30は、コマンドの送信前に、データ更新情報を第2サーバ40に対して送信する。そして、第1サーバ30は、第2サーバ40からのデータ更新完了通知をトリガーとして、リーダライタ22、24を介して、ユーザ装置12、14に対し、コマンドとコマンドの付随情報とを送信する。例えば、まず、第1サーバ30は、第1サーバ30内のテーブルからステータスがReadyであるレコードを特定し、この特定したレコードのステータスをReadyからWaitに変更する。次いで、第1サーバ30は、このステータスが変更されたレコードに含まれるデータをデータ更新情報に含めて、第2サーバ40に送信する。次いで、第1サーバ30は、第2サーバ40からのデータ更新完了通知を受信した場合に、この通知をトリガーとして、そのステータスを変更したレコードに格納されるコマンドとコマンドの付随情報(例:シーケンス番号と実行番号)を、そのステータスを変更したレコードのセッション鍵で暗号化し、これを、そのステータスを変更したレコードのリーダライタ番号により識別されるリーダライタ22、24を介して、ユーザ装置12、14に対して送信する。
The
第1サーバ30は、コマンドの送信後、所定の時間内にユーザ装置12、14からレスポンスを受信しなかった場合、コマンドとコマンドの付随情報とを再び送信(再送)する。なお、本明細書における「送信」には、初めての送信のほか、再度の送信(再送)も含まれる。
When the
(第2サーバ40)
第2サーバ40はネットワーク50を介して第1サーバ30とリーダライタ22、24とに接続されている。第2サーバ40はCPUやメモリなどを備えており、CPUがメモリなどに記憶されているプログラムを実行することにより動作する。第2サーバ40のメモリにはデータが記憶されている。
(Second server 40)
The
図3は第2サーバ40内のデータを説明する模式図である。図3に示すように、第2サーバ40内のデータは、第1サーバ30内のデータと同様に、テーブル形式で記憶されている。テーブルはレコードを有している。レコードに格納されるデータやレコードの暗号化などについては第1サーバ30の場合と同様であるので説明を省略する。
FIG. 3 is a schematic diagram for explaining data in the
第2サーバ40は、第1サーバ30からデータ更新情報を受信した場合に、受信したデータ更新情報に基づいて第2サーバ40内のデータを更新する。これにより、第2サーバ40内のデータが第1サーバ30内のデータに同期される。データの更新は、新たなレコードを追加することにより行なわれ、新たなレコード中の各フィールドには、データ更新情報に含まれる各データが格納される。
When the
第2サーバ40は、データの更新後、データ更新完了通知を第1サーバ30に対して送信する。データ更新完了通知はデータの更新が完了したこと示す通知である。
The
第2サーバ40は、第2サーバ40内のデータの更新後、第1サーバ30から第2サーバ40への切り替えが生じた場合、第2サーバ40内のデータに基づいて、コマンドとコマンドの付随情報とをリーダライタ22、24を介してユーザ装置12、14に対し送信する。つまり、第2サーバ40は、第1サーバ30から第2サーバ40への切り替えが生じた場合、第1サーバ30に代わり、ユーザ装置12、14に対する処理を受け持つことになる。第2サーバ40からの送信は、第2サーバ40内のデータに基づいて行なわれる。第2サーバ40内のデータは第1サーバ10から受信したデータ更新情報に基づき最新の状態に保たれているため、第2サーバ40によるコマンドなどの送信は、第1サーバ30によるコマンドなどの送信と同様に行なわれる。切り替わりの原因は特に限定されない。一例を挙げると、切り替わりは、第1サーバ30に障害が発生した場合や第1サーバ30が過負荷である場合に生じる。
When the
[実施形態1に係る通信システム1の動作例]
図4は実施形態1に係る通信システム1の動作例を説明するシーケンス図である。以下、図4を参照しつつ、実施形態1に係る通信システム1の動作例について説明する。
[Operation Example of
FIG. 4 is a sequence diagram illustrating an operation example of the
(ステップS11)
まず、第1サーバ30が第1サーバ30内のデータを更新する。データの更新は、例えば、第1サーバ30内のテーブルに新しいレコードを追加することにより行う。ここでは、新しいレコードに、レコード番号=1、コマンド=電子マネーの残高を100円増額、シーケンス番号=0001、実行番号=00AA、セッション鍵、リーダライタ番号=リーダライタ22、ステータス=Ready、及び更新時刻が格納されるものとする。
(Step S11)
First, the
(ステップS12)
次いで、第1サーバ30が、コマンドの送信前に、データ更新情報を第2サーバ40に対して送信する。例えば、まず、第1サーバ30は、第1サーバ30内のテーブルからステータスがReadyであるレコードを特定し、この特定したレコードのステータスをReadyからWaitに変更する。次いで、第1サーバ30は、このステータスが変更されたレコードに含まれるデータをデータ更新情報に含めて、第2サーバ40に送信する。
(Step S12)
Next, the
(ステップS13)
次いで、第2サーバ40が、第1サーバ30から受信したデータ更新情報に基づいて第2サーバ40内のデータを更新する。データの更新は、例えば、データ更新情報に基づいて第2サーバ40内のテーブルに新しいレコードを追加することにより行う。新たに追加されるレコードの各フィールドには、受信したデータ更新情報に含まれるデータが格納される。なお、第2サーバ40は、第2サーバ40内のテーブルに、受信したデータ更新情報に含まれる更新時刻よりも新しい更新時刻を有するレコードが含まれている場合には、新しくレコードを追加することなく、受信したデータ更新情報を破棄することができる。
(Step S13)
Next, the
(ステップS14)
次いで、第2サーバ40が、第1サーバ30に対して、データ更新完了通知を送信する。
(Step S14)
Next, the
(ステップS15、ステップS16)
次いで、第1サーバ30が、第2サーバ40からのデータ更新完了通知をトリガーとして、リーダライタ22、24を介して、ユーザ装置12、14に対し、コマンドとコマンドの付随情報とを送信する。例えば、第1サーバ30は、第2サーバ40からのデータ更新完了通知を受信した場合に、ステップS12でステータスを変更したレコードに格納されるコマンド=電子マネーの残高を100円増額、シーケンス番号=0001、及び実行番号=00AAを、そのステータスを変更したレコードのセッション鍵で暗号化し、これを、そのステータスを変更したレコードのリーダライタ番号により識別されるリーダライタ22を介して、ユーザ装置12に対して送信する。本ステップによりコマンドを送信するシーケンスは、シーケンス番号=0001で識別される。
(Step S15, Step S16)
Next, the
(ステップS17)
次いで、ユーザ装置12が、第1サーバ30から受信したシーケンス番号=0001、及び実行番号=00AAを参照しつつ、第1サーバ30から受信したコマンドを実行し、データの更新条件が満たされているかどうかを判断する(ステップS17)。そして、ユーザ装置12は、満たされている場合にはユーザ装置12内のデータを更新する(ステップS18)。ここでは、データの更新条件が満たされているものとして、ユーザ装置12はデータを更新する。また、ユーザ装置12内に記憶される電子マネーの残高があらかじめ200円であったものとし、電子マネーの残高は200円から300円に変更されるものとする。なお、ユーザ装置12、14は、例えば、ユーザ装置12、14内の記憶装置に、データ更新を行ったコマンドの実行番号を記憶しておくことができる。このようすれば、既にデータ更新を行ったコマンドであるかどうかを容易に判断することができる。
(Step S17)
Next, the
(ステップS19)
次いで、ユーザ装置12が、第1サーバ30に対して、データの更新が正常に完了したことを示すレスポンスを送信する。ユーザ装置12は、レスポンスの送信前に、このレスポンスを第1サーバ30との相互認証により生成したセッション鍵により暗号化する。本ステップによりレスポンスを送信するシーケンスは、シーケンス番号=0002で識別される。なお、本実施形態では、本ステップによりユーザ装置12から送信されたレスポンスが第1サーバ30に到達する前に喪失されてしまうものとする。
(Step S19)
Next, the
(ステップS20)
次いで、第1サーバ30に障害が発生し、第1サーバ30から第2サーバ40へユーザ装置12、14に対する処理が引き継がれるものとする。これにより、以後、ユーザ装置12、14に対する処理は第1サーバ30ではなく第2サーバ40が受け持つことになる。なお、例えば、第2サーバ40は第1サーバ30に対して所定のインターバルでポーリングを送信し、第1サーバ30からポーリングに対する返答がない場合には、第1サーバ30に障害が生じたと判断して、第1サーバ30から処理を引き継ぐことができる。また、例えば、第2サーバ40は、第1サーバ30と第2サーバ40の負荷を監視する負荷分担装置(ロードバランサ)から引き継ぎを行う旨の命令を受信した場合に、この受信した命令に従い、第1サーバ30の処理を引き継ぐことができる。
(Step S20)
Next, it is assumed that a failure occurs in the
(ステップS21、ステップS22)
次いで、第2サーバ40が、第2サーバ40内のデータに基づき、ユーザ装置12、14から所定時間以内にレスポンスが届いていないかどうかを判断し(ステップS21)、届いていない場合には第2サーバ40内のデータを更新する(ステップS22)。本実施形態では、第2サーバ40は、ユーザ装置12から所定時間以内にレスポンスが届いていないものと判断し、第2サーバ40内のデータを更新する。レスポンスが届いていないかどうかの判断は、例えば、第2サーバ40内のテーブルに記憶されているレコードのうち、ステータスがWaitであるレコードを特定し、この特定したレコードの更新時刻から所定の時間が経過しているかどうかを判断することにより行うことができる。
(Step S21, Step S22)
Next, the
ステップS22によるデータの更新は、例えば、次のように行うことができる。すなわち、まず、第2サーバ40が、第2サーバ40内に記憶するテーブルからステータスがWaitであるレコードを特定する。次いで、第2サーバ40が、この特定したレコードからコマンド=電子マネーの残高を100円増額、シーケンス番号=0001、実行番号=00AA、セッション鍵、リーダライタ番号=リーダライタ22、及びステータス=Waitを読み出す。次いで、第2サーバ40が、読み出したシーケンス番号=0001に基づき新たなシーケンス番号=0003を生成し、新たなレコード番号=2、読み出したコマンド=電子マネーの残高を100円増額、生成したシーケンス番号=0003、読み出した実行番号=00AA、読み出したセッション鍵、読み出したリーダライタ番号=リーダライタ22、ステータス=Ready、及び更新時刻を有する新たなレコードを第2サーバ40内のテーブルに追加する。
The data update in step S22 can be performed as follows, for example. That is, first, the
(ステップS23、ステップS24)
次いで、第2サーバ40が、第2サーバ40内のデータに基づいて、コマンド、シーケンス番号、及び実行番号をリーダライタ22を介してユーザ装置12に対し送信する。例えば、第2サーバ40は、第2サーバ40内のテーブルからステータスがReadyであるレコードを特定し、この特定したレコードのステータスをReadyからWaitに変更する。次いで、第2サーバ40は、このステータスを変更したレコードに格納されているコマンド、シーケンス番号、及び実行番号を、このステータスを変更したレコードに格納されているセッション鍵で暗号化し、このステータスを変更したレコードのリーダライタ番号で識別されるリーダライタ22を介して、そのリーダライタ22との間で通信を行うユーザ装置12に対して送信する。本ステップによりコマンドを送信するシーケンスは、シーケンス番号=0003で識別される。
(Step S23, Step S24)
Next, the
(ステップS25、ステップS26)
次いで、ユーザ装置12が、第2サーバ40から受信したシーケンス番号=0003及び実行番号=00AAを参照しつつ、第2サーバ40から受信したコマンドを実行し、データの更新条件が満たされているかどうか判断する(ステップS24)。そして、ユーザ装置12は、データの更新条件が満たされている場合にはユーザ装置12内のデータを更新する(ステップS25)。ここでは、シーケンス番号が予め定められたプロトコルに従い0002から0003に規則正しくインクリメントされているが、実行番号が既にデータ更新を行ったコマンドの実行番号と同じ00AAであるため、データの更新条件は満たされていないものとする。したがって、ユーザ装置12によるデータの更新は行われない。なお、ユーザ装置12は、ユーザ装置12内の記憶装置に既にデータ更新を行ったコマンドの実行番号が記憶されている場合は、第2サーバ40から受信した実行番号をこの記憶されている実行番号と比較することにより、実行番号が既にデータ更新を行ったコマンドの実行番号と同じであるかどうかを容易に判断することができる。
(Step S25, Step S26)
Next, the
(ステップS27、ステップS28)
次いで、ユーザ装置12が、第2サーバ40に対して、データの更新に対するレスポンスを送信する。ユーザ装置12は、このレスポンスの送信前に、このレスポンスを第1サーバ30との相互認証により生成したセッション鍵により暗号化する。本ステップによりレスポンスを送信するシーケンスは、シーケンス番号=0004で識別される。
(Step S27, Step S28)
Next, the
以上説明した実施形態1に係る通信システムによれば、第1サーバ30と第2サーバ40の同期(レプリケーション)が適切なタイミングで行われる。すなわち、第1サーバ30からユーザ装置12、14に対しコマンドを送信する前に、第1サーバ30から第2サーバ40に対してデータ更新情報が送信され、第1サーバ30内のデータと第2サーバ40内のデータとが同期(レプリケーション)される。したがって、第1サーバ30からユーザ装置12、14に対しコマンドを送信した後に第1サーバ30から第2サーバ40への切り替わりが生じても、第1サーバ30から第2サーバ40へユーザ装置12、14に対する処理を正しく引き継ぐことができる。
According to the communication system according to the first embodiment described above, synchronization (replication) of the
なお、本実施形態では、通信システム1が、第1サーバ30と第2サーバ40という2台のサーバを備えるものとしたが、通信システム1は、3台以上のサーバを備えていてもよい。この場合、3台目以降のサーバは、例えば、上記で説明した第2サーバ40と同様に動作させることができる。また、3台目以降のサーバには、例えば、第1サーバ30ではなく、第1サーバ30の処理を引き継ぐ場合と同様の方法により、第2サーバ40の処理を引き継がせることもできる。
In the present embodiment, the
[比較例1]
比較例1として、第1サーバ30からユーザ装置12、14に対しコマンドを送信した後、1秒経過後、第1サーバ30から第2サーバ40に対してデータ更新情報が送信される通信システムを検討する。比較例1では、第1サーバ30からユーザ装置12、14に対しコマンドを送信した後、第1サーバ30から第2サーバ40に対してデータ更新情報を送信する前に、第1サーバ30に障害が生じ、第1サーバ30から第2サーバ40への切り替わりが生じるものとする。
[Comparative Example 1]
As Comparative Example 1, a communication system in which data update information is transmitted from the
比較例1では、第2サーバ40内のデータはコマンド送信後における第1サーバ30内の最新データと同期されず、第2サーバ40内のテーブルには、コマンド=電子マネーの残高を100円増額、シーケンス番号=0001、実行番号=00AA、セッション鍵、リーダライタ番号=リーダライタ22、及びステータス=Waitが存在しない。したがって、比較例1では、第1サーバ30から第2サーバ40に対してユーザ装置12、14に対する処理を正しく引き継ぐことができない。
In Comparative Example 1, the data in the
具体的には、比較例1によると、シーケンス番号が正しく引き継がれないため、ユーザ装置12は、上記したステップS25でデータの更新条件を満たさないと判断し、ユーザ装置12内のデータを更新するステップS26を実行しない。
Specifically, according to Comparative Example 1, since the sequence number is not correctly transferred, the
また、実行番号が正しく引き継がれないため、仮にステップS26のデータ更新が実行されると、ユーザ装置12内に記憶される電子マネーの残高が既に100円増加されているにもかかわらず、誤って再び100円増額されることになる。
In addition, since the execution number is not taken over correctly, if the data update in step S26 is executed, the balance of electronic money stored in the
以上、実施形態について説明したが、これらの説明は、本発明の一例に関するものであり、本発明は、これらの説明によって何ら限定されるものではない。 As mentioned above, although embodiment was described, these description is related with an example of this invention, and this invention is not limited at all by these description.
1 通信システム
12、14 ユーザ装置
22、24 リーダライタ
30 第1サーバ
40 第2サーバ
50 ネットワーク
DESCRIPTION OF
Claims (5)
前記第1サーバは、
前記第2サーバとリーダライタとにネットワークを介して接続され、
データ更新情報を前記第2サーバに対して送信し、
前記データ更新情報を前記第2サーバに対して送信した後、前記リーダライタを介してユーザ装置に対しコマンドとコマンドの付随情報とを送信し、
前記第2サーバは、
前記リーダライタにネットワークを介して接続され、
前記第1サーバから前記データ更新情報を受信した場合に、前記受信したデータ更新情報に基づいて前記第2サーバ内のデータを更新し、
前記更新後、前記第1サーバから前記第2サーバへの切り替えが生じた場合、前記第2サーバ内のデータに基づいてコマンドとコマンドの付随情報とを前記リーダライタを介して前記ユーザ装置に対し送信する通信システム。 A communication system comprising a first server and a second server,
The first server is
Connected to the second server and the reader / writer via a network;
Sending data update information to the second server;
After transmitting the data update information to the second server, a command and accompanying information of the command are transmitted to the user device via the reader / writer,
The second server is
Connected to the reader / writer via a network;
When the data update information is received from the first server, the data in the second server is updated based on the received data update information,
After the update, when a switch from the first server to the second server occurs, a command and accompanying information of the command are sent to the user device via the reader / writer based on data in the second server. A communication system for transmission.
前記シーケンス番号はシーケンスごとに値が異なる請求項1に記載の通信システム。 The data update information includes a sequence number,
The communication system according to claim 1, wherein the sequence number has a different value for each sequence.
前記実行番号はコマンドごとに値が異なる請求項1または2に記載の通信システム。 The data update information includes an execution number,
The communication system according to claim 1, wherein the execution number has a different value for each command.
前記セッション鍵はセッションごとに生成される鍵であり、
前記コマンド及び前記コマンドの付随情報並びに前記ユーザ装置から送信されるレスポンスは前記セッション鍵により暗号化されている請求項1から3のいずれか1項に記載の通信システム。 The data update information includes a session key,
The session key is a key generated for each session;
The communication system according to any one of claims 1 to 3, wherein the command, accompanying information of the command, and a response transmitted from the user apparatus are encrypted by the session key.
The communication system according to claim 1, wherein the second server stores the received data update information encrypted.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2017/000539 WO2018131082A1 (en) | 2017-01-11 | 2017-01-11 | Communication system |
| JP2017522561A JP6157797B1 (en) | 2017-01-11 | 2017-01-11 | Communications system |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| PCT/JP2017/000539 WO2018131082A1 (en) | 2017-01-11 | 2017-01-11 | Communication system |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018131082A1 true WO2018131082A1 (en) | 2018-07-19 |
Family
ID=59272980
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/JP2017/000539 Ceased WO2018131082A1 (en) | 2017-01-11 | 2017-01-11 | Communication system |
Country Status (2)
| Country | Link |
|---|---|
| JP (1) | JP6157797B1 (en) |
| WO (1) | WO2018131082A1 (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000149080A (en) * | 1998-11-13 | 2000-05-30 | Toshiba Corp | Access control device and access control system |
| JP2008123334A (en) * | 2006-11-14 | 2008-05-29 | National Institute Of Advanced Industrial & Technology | Distributed server system |
| JP2015170226A (en) * | 2014-03-07 | 2015-09-28 | 富士通株式会社 | data transfer system and method |
-
2017
- 2017-01-11 JP JP2017522561A patent/JP6157797B1/en not_active Expired - Fee Related
- 2017-01-11 WO PCT/JP2017/000539 patent/WO2018131082A1/en not_active Ceased
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000149080A (en) * | 1998-11-13 | 2000-05-30 | Toshiba Corp | Access control device and access control system |
| JP2008123334A (en) * | 2006-11-14 | 2008-05-29 | National Institute Of Advanced Industrial & Technology | Distributed server system |
| JP2015170226A (en) * | 2014-03-07 | 2015-09-28 | 富士通株式会社 | data transfer system and method |
Also Published As
| Publication number | Publication date |
|---|---|
| JPWO2018131082A1 (en) | 2019-01-17 |
| JP6157797B1 (en) | 2017-07-05 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109756582B (en) | Information recording method, device, node and storage medium in block chain network | |
| JP5818816B2 (en) | Method for identifying and authenticating a wireless tag by a reader | |
| US20060031262A1 (en) | Synchronizing client data and server data | |
| US8769100B2 (en) | Method and apparatus for cluster data processing | |
| US20240275600A1 (en) | Secure element, method for registering tokens, and token reference register | |
| CN101443741A (en) | System and method for using a dynamic credential to identify a cloned device | |
| JP5040486B2 (en) | Network system and program | |
| JP2017525018A (en) | Electronic device, system, and method for NFC | |
| CN106375064B (en) | A kind of code keyboard usb communication abnormal restoring method and system | |
| JP2009015748A (en) | Network system and program | |
| TW201349005A (en) | Security information interactive system, security information interactive device and security information interactive method based on spreading parameter set | |
| JP6157797B1 (en) | Communications system | |
| US7828218B1 (en) | Method and system of communicating devices, and devices therefor, with protected data transfer | |
| US20230222509A1 (en) | Method, terminal, and coin register for transmitting electronic coin data sets | |
| US10536280B2 (en) | RFID tag for secure access to a service from an access terminal | |
| JP5979719B2 (en) | ATM system and method | |
| JP2025110134A (en) | ELECTRONIC INFORMATION STORAGE MEDIUM, IC CHIP, IC CARD, SECURE CHANNEL OPENING METHOD, AND PROGRAM | |
| US10514850B2 (en) | Information processing system, server device, Information processing method, and computer program product | |
| CN119585760A (en) | Secure element, method for registering tokens, and token reference register | |
| JP6801448B2 (en) | Electronic information storage media, authentication systems, authentication methods, and authentication application programs | |
| CN103164912B (en) | A kind of POS system and information processing method based on this POS system | |
| JP2023088716A (en) | Information processing device, information processing system and program | |
| JP2007173911A (en) | Data processing apparatus, program, and system | |
| JP2015050736A (en) | Settlement terminal and settlement terminal program | |
| JP2009230315A (en) | Terminal, information storing medium, service providing system, and data updating method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| ENP | Entry into the national phase |
Ref document number: 2017522561 Country of ref document: JP Kind code of ref document: A |
|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17891782 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 17891782 Country of ref document: EP Kind code of ref document: A1 |