JP2015130092A - Pos control system, printer, and control method of pos control system - Google Patents

Pos control system, printer, and control method of pos control system Download PDF

Info

Publication number
JP2015130092A
JP2015130092A JP2014001450A JP2014001450A JP2015130092A JP 2015130092 A JP2015130092 A JP 2015130092A JP 2014001450 A JP2014001450 A JP 2014001450A JP 2014001450 A JP2014001450 A JP 2014001450A JP 2015130092 A JP2015130092 A JP 2015130092A
Authority
JP
Japan
Prior art keywords
data
unit
print
control
printing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014001450A
Other languages
Japanese (ja)
Other versions
JP6287215B2 (en
JP2015130092A5 (en
Inventor
杉山 雄一
Yuichi Sugiyama
雄一 杉山
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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP2014001450A priority Critical patent/JP6287215B2/en
Priority to CN201410836406.3A priority patent/CN104765579B/en
Priority to US14/591,490 priority patent/US9224138B2/en
Priority to EP15150457.8A priority patent/EP2894559A1/en
Publication of JP2015130092A publication Critical patent/JP2015130092A/en
Priority to US14/851,256 priority patent/US9406204B2/en
Publication of JP2015130092A5 publication Critical patent/JP2015130092A5/ja
Application granted granted Critical
Publication of JP6287215B2 publication Critical patent/JP6287215B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To enable, in a POS control system in which a POS terminal transmits print control data to a printer, a control device connected with the printer via a network to perform processing based on the print control data, and make the system compliant to a configuration in which the printer communicates with the control device via the network.SOLUTION: A POS control system 1 includes: a POS terminal 8 that transmits print control data; a printer 12 that has a printing unit 41, a print control unit 29 controlling the printing unit 41 on the basis of the print control data, and a print data communication unit 26 transmitting the print control data via a first WebSocket connection CT1; and a control server 10 that has a print data processing unit 51 performing processing based on the received print control data.

Description

本発明は、印刷装置を有するPOS制御システム、印刷装置、及びPOS制御システムの制御方法に関する。   The present invention relates to a POS control system having a printing apparatus, a printing apparatus, and a control method for the POS control system.

従来、POS端末と、印刷装置とが通信可能に接続され、印刷装置が、POS端末の制御に従って、印刷を実行するシステムが知られている(例えば、特許文献1参照)。この種のシステムでは、通常、POS端末が印刷装置に印刷制御データを送信し、印刷装置は、印刷制御データに基づいて印刷を実行する。また、印刷装置を、ネットワークを介してサーバー等の制御装置に接続し、印刷装置が制御装置とネットワークを介して通信するシステムが知られている。   2. Description of the Related Art Conventionally, a system is known in which a POS terminal and a printing apparatus are communicably connected, and the printing apparatus executes printing in accordance with control of the POS terminal (see, for example, Patent Document 1). In this type of system, the POS terminal usually transmits print control data to the printing apparatus, and the printing apparatus executes printing based on the print control data. There is also known a system in which a printing device is connected to a control device such as a server via a network, and the printing device communicates with the control device via the network.

特開2011−108097号公報JP 2011-108097 A

上述したシステムのように、POS端末から印刷装置に印刷制御データを送信するシステムについて、印刷装置を、サーバー等の制御装置にネットワークを介して接続する場合、POS端末が印刷装置に送信する印刷制御データを利用して、制御装置による処理を実行できるようにしたいとするニーズがある。また、この場合、システムを、印刷装置と制御装置とがネットワークを介して通信する構成に対応させる必要がある。
本発明は、上述した事情に鑑みてなされたものであり、POS端末から印刷装置に印刷制御データを送信するPOS制御システムについて、印刷装置にネットワークを介して接続された制御装置が印刷制御データに基づく処理をできるようにし、また、システムを、印刷装置と制御装置とがネットワークを介して通信する構成に対応させることを目的とする。
For a system that transmits print control data from a POS terminal to a printing device, such as the system described above, when the printing device is connected to a control device such as a server via a network, the print control that the POS terminal transmits to the printing device. There is a need to be able to execute processing by a control device using data. In this case, the system needs to correspond to a configuration in which the printing apparatus and the control apparatus communicate via a network.
The present invention has been made in view of the above-described circumstances. For a POS control system that transmits print control data from a POS terminal to a printing apparatus, a control apparatus connected to the printing apparatus via a network is included in the print control data. It is an object of the present invention to make it possible to perform processing based on the above, and to make the system compatible with a configuration in which a printing apparatus and a control apparatus communicate via a network.

上記目的を達成するために、本発明のPOS制御システムは、決済処理に基づいて印刷制御データを生成する制御部、及び前記印刷制御データを送信する通信部を有するPOS端末と、印刷を行う印刷部、前記印刷制御データに基づいて前記印刷部を制御する印刷制御部、前記POS端末と接続して前記印刷制御データを受信する通信接続部、及び前記印刷制御データを通信経路により非同期の双方向通信で送信する印刷データ通信部を有する印刷装置と、前記印刷装置の前記印刷データ通信部で送信された前記印刷制御データを前記通信経路で受信する受信部、及び受信した前記印刷制御データに基づく処理を行う印刷データ処理部を有する制御装置と、を備えることを特徴とする。
本発明の構成によれば、POS端末から印刷装置に対して送信された印刷制御データは、印刷データ通信部の機能によって制御装置に送信される。このため、制御装置は、受信した印刷制御データに基づいて、対応する処理を実行できる。また、印刷装置は、非同期の双方向通信で印刷制御データを制御装置に送信する。従って、印刷装置は、POS端末から印刷制御データを受信した場合、制御装置との間で通信の同期をとることなく、制御装置に印刷制御データを送信できる。このため、POS端末から印刷装置に印刷制御データを送信するPOS制御システムについて、印刷装置にネットワークを介して接続された制御装置が印刷制御データに基づく処理をできるようにでき、当該システムを、印刷装置と制御装置とがネットワークを介して通信する構成に対応させることができる。
In order to achieve the above object, a POS control system according to the present invention includes a control unit that generates print control data based on a settlement process, and a POS terminal that includes a communication unit that transmits the print control data, and printing that performs printing. A print control unit that controls the print unit based on the print control data, a communication connection unit that connects to the POS terminal and receives the print control data, and asynchronously bidirectionally transmits the print control data via a communication path. Based on a printing apparatus having a print data communication unit to be transmitted by communication, a receiving unit for receiving the print control data transmitted by the print data communication unit of the printing apparatus through the communication path, and the received print control data And a control device having a print data processing unit for performing processing.
According to the configuration of the present invention, the print control data transmitted from the POS terminal to the printing apparatus is transmitted to the control apparatus by the function of the print data communication unit. Therefore, the control device can execute a corresponding process based on the received print control data. Further, the printing apparatus transmits print control data to the control apparatus by asynchronous two-way communication. Accordingly, when receiving the print control data from the POS terminal, the printing apparatus can transmit the print control data to the control apparatus without synchronizing communication with the control apparatus. Therefore, for a POS control system that transmits print control data from a POS terminal to a printing device, a control device connected to the printing device via a network can perform processing based on the print control data. It is possible to correspond to a configuration in which the device and the control device communicate via a network.

また、前記印刷制御データは、バイナリーデータであり、前記制御装置の前記印刷データ処理部は、前記印刷制御データに含まれる文字列を抽出し、抽出した文字列を含むテキストデータを生成する。
本発明の構成によれば、制御装置は、印刷制御データから抽出された文字列のテキストを含むテキストデータを生成する。テキストデータは、文字列検索によるデータ分析が可能なデータであり、データの利用性が高い。制御装置は、受信した印刷制御データを、利用性の高いデータに変換できる。
The print control data is binary data, and the print data processing unit of the control device extracts a character string included in the print control data and generates text data including the extracted character string.
According to the configuration of the present invention, the control device generates text data including text of a character string extracted from the print control data. Text data is data that can be analyzed by character string search, and has high data availability. The control device can convert the received print control data into highly usable data.

また、前記制御装置は、前記印刷制御データと前記テキストデータとを対応付けて記憶する記憶部を有する。
本発明の構成によれば、制御装置は、印刷制御データと、印刷制御データに基づくテキストデータを記憶するため、後に、いずれかのデータを分析し、情報を得ることが可能である。また、印刷制御データを記憶することにより、印刷制御データに基づいてテキストデータを生成する際に欠落する情報も、記憶できる。また、印刷制御データを記憶するため、印刷制御データを利用した再印刷を行える。
In addition, the control device includes a storage unit that stores the print control data and the text data in association with each other.
According to the configuration of the present invention, since the control device stores the print control data and the text data based on the print control data, it is possible to later analyze any data and obtain information. Further, by storing the print control data, it is possible to store information that is lost when generating text data based on the print control data. Further, since print control data is stored, reprinting using the print control data can be performed.

また、前記印刷装置は、前記POS端末で送信した前記印刷制御データを、前記印刷制御部及び前記印刷データ通信部に送信する通信制御部を有する。
本発明の構成によれば、通信制御部の機能により、印刷制御データを印刷制御部に送信して印刷部により印刷を行い、印刷制御データを印刷データ通信部に送信して、この印刷データ通信部の機能により印刷制御データを制御装置に送信できる。
The printing apparatus further includes a communication control unit that transmits the print control data transmitted from the POS terminal to the print control unit and the print data communication unit.
According to the configuration of the present invention, by the function of the communication control unit, the print control data is transmitted to the print control unit, printing is performed by the print unit, and the print control data is transmitted to the print data communication unit. The print control data can be transmitted to the control device by the function of the unit.

また、前記印刷装置の前記印刷制御部は、前記印刷部による印刷を行った後、印刷を行ったことを示す通知データを前記通信制御部に送信し、前記印刷装置の通信制御部は、前記通知データを受信した後、前記印刷制御データを前記印刷データ通信部に送信する。
本発明の構成によれば、印刷装置は、印刷部による印刷が完了した後、行われた印刷に対応する印刷制御データを、制御装置に送信できる。
The printing control unit of the printing apparatus transmits notification data indicating that printing has been performed to the communication control unit after printing by the printing unit, and the communication control unit of the printing apparatus includes: After receiving the notification data, the print control data is transmitted to the print data communication unit.
According to the configuration of the present invention, after the printing by the printing unit is completed, the printing apparatus can transmit print control data corresponding to the performed printing to the control apparatus.

また、前記非同期の双方向通信は、WebSocket通信である。
本発明の構成によれば、印刷装置と、制御装置は、WebSocket通信により非同期の双方向通信を行える。
The asynchronous bidirectional communication is WebSocket communication.
According to the configuration of the present invention, the printing apparatus and the control apparatus can perform asynchronous two-way communication by WebSocket communication.

また、本発明の印刷装置は、外部装置と接続して前記外部装置で送信された印刷制御データを受信する通信接続部と、前記印刷制御データに基づいて印刷部を制御する印刷制御部と、前記印刷制御データを非同期の双方向通信で送信する印刷データ通信部と、を有する。
本発明の構成によれば、POS端末等の外部装置から印刷装置に送信された印刷制御データを、制御サーバーに非同期の双方向通信で送信し、制御サーバーで印刷制御データに基づく対応する処理を実行できる。また、印刷装置は、非同期の双方向通信で印刷制御データを送信する。従って、印刷装置は、POS端末から印刷制御データを受信した場合、通信の同期をとることなく、印刷制御データを送信できる。
Further, the printing apparatus of the present invention is a communication connection unit that connects to an external device and receives print control data transmitted from the external device, a print control unit that controls the printing unit based on the print control data, A print data communication unit that transmits the print control data by asynchronous two-way communication.
According to the configuration of the present invention, print control data transmitted from an external device such as a POS terminal to the printing device is transmitted to the control server by asynchronous two-way communication, and the control server performs a corresponding process based on the print control data. Can be executed. In addition, the printing apparatus transmits print control data by asynchronous two-way communication. Therefore, when the printing apparatus receives the print control data from the POS terminal, the printing apparatus can transmit the print control data without synchronizing the communication.

また、本発明のPOS制御システムの制御方法は、POS端末で決済処理を行って、前記決済処理に基づく印刷制御データを生成し、生成された前記印刷制御データを印刷装置に送信し、前記印刷制御データを受信した前記印刷装置で、前記印刷制御データに基づく印刷を実行し、前記印刷装置で前記印刷制御データに基づく印刷を実行した後に、前記印刷制御データを非同期の双方向通信で制御装置に送信することを特徴とする。
本発明の構成によれば、POS端末から印刷装置に対して送信された印刷制御データは、印刷制御部の機能によって制御装置に送信される。このため、制御装置は、受信した印刷制御データに基づいて、対応する処理を実行できる。また、印刷装置は、非同期の双方向通信で印刷制御データを制御装置に送信する。従って、印刷装置は、POS端末から印刷制御データを受信した場合、制御装置との間で通信の同期をとることなく、制御装置に印刷制御データを送信できる。
Further, the control method of the POS control system of the present invention performs payment processing at a POS terminal, generates print control data based on the payment processing, transmits the generated print control data to a printing apparatus, and prints the print The printing apparatus that has received the control data executes printing based on the printing control data, and after the printing apparatus executes printing based on the printing control data, the printing control data is transferred to the control apparatus by asynchronous two-way communication. It is characterized by transmitting to.
According to the configuration of the present invention, the print control data transmitted from the POS terminal to the printing apparatus is transmitted to the control apparatus by the function of the print control unit. Therefore, the control device can execute a corresponding process based on the received print control data. Further, the printing apparatus transmits print control data to the control apparatus by asynchronous two-way communication. Accordingly, when receiving the print control data from the POS terminal, the printing apparatus can transmit the print control data to the control apparatus without synchronizing communication with the control apparatus.

本実施形態に係る制御システムの構成を示す図。The figure which shows the structure of the control system which concerns on this embodiment. 制御サーバーと印刷装置との間で確立される通信経路を示す図。The figure which shows the communication path | route established between a control server and a printing apparatus. 制御システムの各装置の機能的構成を示すブロック図。The block diagram which shows the functional structure of each apparatus of a control system. 印刷装置と制御サーバーとの動作を示すフローチャート。6 is a flowchart showing operations of the printing apparatus and the control server. レシート、及び、印刷制御データを示す図。The figure which shows a receipt and printing control data. 制御システムの各装置の動作を示すフローチャート。The flowchart which shows operation | movement of each apparatus of a control system. 制御システムの各装置の動作を示すフローチャート。The flowchart which shows operation | movement of each apparatus of a control system. 抽出文字列データを示す図。The figure which shows extracted character string data. 制御サーバーが備えるデータベースのレコードのデータ構造を示す図。The figure which shows the data structure of the record of the database with which a control server is provided. 印刷装置の動作を示すフローチャート。6 is a flowchart showing the operation of the printing apparatus. 印刷装置と制御サーバーとの動作を示すフローチャート。6 is a flowchart showing operations of the printing apparatus and the control server.

以下、図面を参照して本発明の実施形態について説明する。
図1は、本実施形態に係るPOS制御システム1の構成を示す図である。
図1に示すように、POS制御システム1は、制御サーバー10を備え、制御サーバー10にインターネット等のネットワークGNを介して複数の店舗システム11を接続する。また、ネットワークGNは、複数の管理装置14を接続する。
店舗システム11は、スーパーマーケットや、コンビニエンスストア、デパート、飲食店等の店舗に用いられるシステムである。店舗システム11は、店舗に来店した顧客に対してレシートを発行する機能を備える。
店舗システム11は、印刷媒体に印刷を行う印刷機能を有し、レシートを発行可能な1又は複数の印刷装置12を備える。印刷装置12は、店舗内に構築されたローカルエリアネットワークLNに接続される。ローカルエリアネットワークLNは、ネットワークルーターや、モデム等の通信機器を含んで構成されたネットワーク通信制御装置13を接続する。印刷装置12は、ネットワーク通信制御装置13を介して、ネットワークGNにアクセスする。
店舗システム11において、印刷装置12は、POS端末8と接続する。POS端末8は、POSアプリケーション及びプリンタードライバーがインストールされ、これらプログラムの機能により、印刷装置12を制御する。後述するように、プリンタードライバーは、印刷装置12のコマンド体系に従った印刷制御データを生成する機能を有する。POS端末8は、プリンタードライバーの機能により、印刷装置12にレシートを発行させる印刷制御データを生成し、送信して、印刷装置12を制御する。図示は省略するが、POS端末8には、商品や商品の包装に付されたバーコードを読み取るバーコードリーダーや、顧客の会員カード等のカードを読み取るカードリーダーが接続される。また、POS端末8は、図示しないPOSサーバーにアクセスし、POSサーバーが記憶する商品マスター、顧客マスターから所定の情報を取得可能である。POS端末8は、店舗に来店した顧客の会計に際し、バーコードリーダーや、カードリーダーからの入力、また、テンキー等の入力手段に対するレジ担当者の入力に基づいて、商品マスターや顧客マスターから情報を取得して、印刷制御データを生成する。
図1において、店舗システム11Aは、スーパーマーケットSMに用いるシステムである。スーパーマーケットSMには、複数のレジカウンターRCが設けられ、レジカウンターRCには、印刷装置12、及び、POS端末8が設けられる。レジカウンターRCで、POS端末8は、会計に応じて、印刷装置12に印刷制御データを送信し、印刷装置12にレシートを発行させる。店舗システム11Aの印刷装置12は、ローカルエリアネットワークLNに接続され、ネットワーク通信制御装置13を介して、ネットワークGNにアクセスする。
本実施形態に係るPOS制御システム1で、店舗システム11の印刷装置12は、制御サーバー10との間で通信経路を確立し、制御サーバー10と通信する。詳細は後述するが、制御サーバー10は、印刷装置12との間で確立された通信経路により、POS端末8が印刷装置12に対して送信したデータを取得し、取得したデータに基づいて対応する処理を実行する。
管理装置14は、1又は複数の店舗システム11を管理する装置である。例えば、管理装置14は、店舗を運営する企業の本社に設けられ、当該店舗を運営する企業のグループの複数の店舗に設けられた店舗システム11を管理する。詳細は後述するが、管理装置14は、POS端末8から印刷装置12に送信されたデータに基づくデータを取得し、取得したデータに基づいて対応する処理を実行する。
Hereinafter, embodiments of the present invention will be described with reference to the drawings.
FIG. 1 is a diagram showing a configuration of a POS control system 1 according to the present embodiment.
As shown in FIG. 1, the POS control system 1 includes a control server 10 and connects a plurality of store systems 11 to the control server 10 via a network GN such as the Internet. The network GN connects a plurality of management devices 14.
The store system 11 is a system used in stores such as supermarkets, convenience stores, department stores, restaurants, and the like. The store system 11 has a function of issuing a receipt to a customer who has visited the store.
The store system 11 has a printing function for printing on a print medium, and includes one or a plurality of printing apparatuses 12 that can issue receipts. The printing apparatus 12 is connected to a local area network LN built in the store. The local area network LN connects a network communication control device 13 including a network router and a communication device such as a modem. The printing device 12 accesses the network GN via the network communication control device 13.
In the store system 11, the printing device 12 is connected to the POS terminal 8. The POS terminal 8 is installed with a POS application and a printer driver, and controls the printing apparatus 12 by the functions of these programs. As will be described later, the printer driver has a function of generating print control data in accordance with the command system of the printing apparatus 12. The POS terminal 8 controls the printing apparatus 12 by generating and transmitting print control data for causing the printing apparatus 12 to issue a receipt by the function of the printer driver. Although not shown, the POS terminal 8 is connected to a bar code reader for reading a bar code attached to a product or a product packaging or a card reader for reading a card such as a customer membership card. The POS terminal 8 can access a POS server (not shown) and acquire predetermined information from a product master and a customer master stored in the POS server. The POS terminal 8 collects information from the product master and the customer master based on the input from the bar code reader or card reader or the cashier in charge of the input means such as the numeric keypad when accounting for the customer who came to the store. Obtain print control data.
In FIG. 1, a store system 11A is a system used for a supermarket SM. The supermarket SM is provided with a plurality of cashier counters RC, and the cashier counter RC is provided with the printing device 12 and the POS terminal 8. At the register counter RC, the POS terminal 8 transmits print control data to the printing apparatus 12 according to the transaction, and causes the printing apparatus 12 to issue a receipt. The printing device 12 of the store system 11A is connected to the local area network LN and accesses the network GN via the network communication control device 13.
In the POS control system 1 according to the present embodiment, the printing device 12 of the store system 11 establishes a communication path with the control server 10 and communicates with the control server 10. Although details will be described later, the control server 10 acquires data transmitted from the POS terminal 8 to the printing device 12 through a communication path established with the printing device 12, and responds based on the acquired data. Execute the process.
The management device 14 is a device that manages one or a plurality of store systems 11. For example, the management device 14 is provided at the head office of a company that operates a store, and manages the store system 11 that is provided at a plurality of stores of a group of companies that operate the store. Although details will be described later, the management device 14 acquires data based on the data transmitted from the POS terminal 8 to the printing device 12, and executes a corresponding process based on the acquired data.

図2は、POS制御システム1における制御サーバー10と、印刷装置12との間に確立される通信経路を示す図である。
図2に示すように、POS制御システム1において、制御サーバー10と、店舗システム11の印刷装置12との間には、WebSocket通信を行うWebSocketコネクションCTが確立される。
なお、WebSocketは、非同期な双方向通信を可能とする通信規格の1つである。WebSocketでは、サーバーとクライアントがWebSocketコネクションCTを確立した後は、データの送受信を、当該コネクションによりWebSocketのプロトコルを用いて行う。このため、データの送信が発生する度に、コネクションを確立する必要がない。
また、WebSocketコネクションCTは、当該コネクションで接続された印刷装置12と、制御サーバー10との間で、WebSocketの規格、手続きに従ってデータを送受信する論理的な通信経路である。従って、印刷装置12と、制御サーバー10との間で、所定のハンドシェイクが行われ、WebSocketコネクションCTを確立した後は、印刷装置12と制御サーバー10とは、WebSocketコネクションCTにより、非同期にデータを送受信できる。制御サーバー10は、任意のタイミングでWebSocketコネクションCTにより印刷装置12にデータを送信でき、印刷装置12は、任意のタイミングでWebSocketコネクションCTにより制御サーバー10にデータを送信できる。
また、WebSocket通信は、WebSocketコネクションCTにより印刷装置12と制御サーバー10との間で行われる、WebSocketのプロトコル、手続きに従った非同期な双方向通信である。
WebSocketコネクションCTの確立で、印刷装置12、及び、制御サーバー10は、非同期で、双方向通信できる。制御サーバー10は、クライアントとしての印刷装置12からリクエストを受けることなく、任意のタイミングで、WebSocketコネクションCTによりWebSocket通信で印刷装置12にデータをプッシュ送信できる。同様に、印刷装置12は、任意のタイミングで、WebSocketコネクションCTで制御サーバー10に対してデータをプッシュ送信できる。
本実施形態では、後述するように、印刷装置12が複数の機能部(後述)を有し、複数の機能部に応じて、制御サーバー10との間でWebSocketコネクションCTが確立される。従って、1台の印刷装置12と制御サーバー10との間で、複数のWebSocketコネクションCTが確立される。
また、図2に示すように、制御サーバー10は、複数の管理装置14を通信可能に接続する。
FIG. 2 is a diagram illustrating a communication path established between the control server 10 and the printing apparatus 12 in the POS control system 1.
As shown in FIG. 2, in the POS control system 1, a WebSocket connection CT for performing WebSocket communication is established between the control server 10 and the printing device 12 of the store system 11.
WebSocket is one of the communication standards that enables asynchronous two-way communication. In WebSocket, after a server and a client establish a WebSocket connection CT, data is transmitted and received using the WebSocket protocol through the connection. For this reason, it is not necessary to establish a connection every time data transmission occurs.
The WebSocket connection CT is a logical communication path for transmitting and receiving data according to the WebSocket standard and procedure between the printing apparatus 12 connected via the connection and the control server 10. Therefore, after a predetermined handshake is performed between the printing apparatus 12 and the control server 10 and the WebSocket connection CT is established, the printing apparatus 12 and the control server 10 asynchronously transmit data using the WebSocket connection CT. Can be sent and received. The control server 10 can transmit data to the printing apparatus 12 through the WebSocket connection CT at an arbitrary timing, and the printing apparatus 12 can transmit data to the control server 10 through the WebSocket connection CT at an arbitrary timing.
The WebSocket communication is an asynchronous two-way communication according to the WebSocket protocol and procedure, which is performed between the printing apparatus 12 and the control server 10 by the WebSocket connection CT.
By establishing the WebSocket connection CT, the printing apparatus 12 and the control server 10 can perform two-way communication asynchronously. The control server 10 can push-transmit data to the printing apparatus 12 by WebSocket communication using the WebSocket connection CT at an arbitrary timing without receiving a request from the printing apparatus 12 as a client. Similarly, the printing apparatus 12 can push-transmit data to the control server 10 through the WebSocket connection CT at an arbitrary timing.
In the present embodiment, as will be described later, the printing apparatus 12 includes a plurality of functional units (described later), and a WebSocket connection CT is established with the control server 10 in accordance with the plurality of functional units. Accordingly, a plurality of WebSocket connections CT are established between one printing apparatus 12 and the control server 10.
As shown in FIG. 2, the control server 10 connects a plurality of management devices 14 so that they can communicate with each other.

本実施形態において、制御サーバー10は、印刷装置12、及び、管理装置14をクライアントとする、いわゆるクラウドシステムにおけるクラウドサーバーである。制御サーバー10は、演算処理機能を有し、印刷装置12の要求や、管理装置14の要求、所定の条件の成立等をトリガーとして所定の演算処理を実行し、演算処理の結果に基づくデータをWebSocketコネクションCTで印刷装置12や、管理装置14に送信する。
なお、図2では、制御サーバー10を、1つのブロックによって表現するが、これは、制御サーバー10が単一のサーバー装置により構成されることを意味するものではない。例えば、制御サーバー10は、複数のサーバー装置を含んで構成されたものであってもよく、所定のシステムの一部の機能により実現されるサーバーであってもよい。後述する各種処理を実現可能な構成であれば、その形態を問わない。
また、本実施形態では、制御サーバー10と印刷装置12との間で、WebSocket通信を行う。しかしながら、これら装置が、WebSocket通信に代えて、WebSocket通信と同様な非同期な双方向通信を行う構成であってもよい。
In the present embodiment, the control server 10 is a cloud server in a so-called cloud system in which the printing device 12 and the management device 14 are clients. The control server 10 has an arithmetic processing function, and executes predetermined arithmetic processing triggered by a request from the printing device 12, a request from the management device 14, establishment of a predetermined condition, and the like, and data based on the result of the arithmetic processing is obtained. The data is transmitted to the printing apparatus 12 and the management apparatus 14 using the WebSocket connection CT.
In FIG. 2, the control server 10 is represented by one block, but this does not mean that the control server 10 is configured by a single server device. For example, the control server 10 may be configured to include a plurality of server devices, or may be a server realized by some functions of a predetermined system. Any configuration can be used as long as various types of processing described later can be realized.
In the present embodiment, WebSocket communication is performed between the control server 10 and the printing apparatus 12. However, these devices may be configured to perform asynchronous bidirectional communication similar to WebSocket communication instead of WebSocket communication.

このように、POS制御システム1で、印刷機能を有する印刷装置12が、複数台(例えば、1000台)、WebSocketコネクションCTにより、制御サーバー10と通信可能に接続される。
このような構成のため、以下の効果を得ることができる。
制御サーバー10は、複数の店舗システム11に接続された複数の印刷装置12から受信したデータを収集し、収集したデータに基づく情報を管理、分析できる。このため、制御サーバー10は、情報を蓄積することができる。蓄積した情報は、いわゆるビッグデータとして活用可能である。また、制御サーバー10は、印刷装置12から受信したデータについて、ネットワークGNを介して管理装置14を含む外部機器に送信できる。
また、印刷装置12に、制御サーバー10の機能により、POS端末8の制御に基づく印刷処理以外の処理を実行させることができる。特に、本実施形態に係るPOS制御システム1の構成で、印刷装置12をネットワークGNに接続するという簡易な作業により、制御サーバー10の機能によって印刷装置12に各種処理を実行させることができる。また、後述するように、本実施形態では、印刷装置12とPOS端末8とが接続された既存のシステムに改変を加えず、または、既存のシステムに影響を与えることなく、印刷装置12が制御サーバー10の機能を用いて各種処理を実行する。
また、制御サーバー10に、異なる店舗システム11の印刷装置12がWebSocketコネクションCTで接続されるため、制御サーバー10は、複数の店舗システム11に接続された複数の印刷装置12を管理できる。また、制御サーバー10は、複数の店舗システム11に接続された複数の印刷装置12を動作させることが可能となる。
As described above, in the POS control system 1, a plurality of printing apparatuses 12 (for example, 1000) having a printing function are communicably connected to the control server 10 through the WebSocket connection CT.
Due to such a configuration, the following effects can be obtained.
The control server 10 can collect data received from a plurality of printing apparatuses 12 connected to a plurality of store systems 11, and can manage and analyze information based on the collected data. For this reason, the control server 10 can accumulate information. The accumulated information can be used as so-called big data. Further, the control server 10 can transmit the data received from the printing apparatus 12 to an external device including the management apparatus 14 via the network GN.
Further, it is possible to cause the printing apparatus 12 to execute processes other than the printing process based on the control of the POS terminal 8 by the function of the control server 10. In particular, with the configuration of the POS control system 1 according to the present embodiment, the printing apparatus 12 can execute various processes by the function of the control server 10 by a simple operation of connecting the printing apparatus 12 to the network GN. Further, as will be described later, in the present embodiment, the printing apparatus 12 is controlled without modifying or affecting the existing system to which the printing apparatus 12 and the POS terminal 8 are connected. Various processes are executed using the functions of the server 10.
Further, since the printing devices 12 of different store systems 11 are connected to the control server 10 by the WebSocket connection CT, the control server 10 can manage a plurality of printing devices 12 connected to the plurality of store systems 11. Further, the control server 10 can operate a plurality of printing apparatuses 12 connected to a plurality of store systems 11.

図3は、本実施形態に係る印刷装置12、POS端末8、制御サーバー10、及び、管理装置14の機能的構成を示すブロック図である。
なお、図3では、印刷装置12を示すブロック内で、基板(インターフェース基板20、及び、プリンター基板21)を示すブロック内に、機能ブロックを表示する。これは、1の機能ブロックの機能が、当該1の機能ブロックに対応する基板に実装されたハードウェア(CPU等)と、所定のソフトウェアとにより実現されることを意味する。
図3に示すように、印刷装置12は、インターフェース基板20と、プリンター基板21とを備え、これら基板が、インターフェース基板20に設けられた第1コネクター22と、プリンター基板21に設けられた第2コネクター23により接続される。
印刷装置12のインターフェース基板20は、通信制御部25と、印刷データ通信部26と、バーコードリーダーデータ通信部27と、カードリーダーデータ通信部28と、印刷制御部29と、第1通信部30と、第2通信部31と、第3通信部32と、USB通信接続部34(通信接続部)と、LAN通信接続部35(通信接続部)と、シリアル通信接続部36(通信接続部)と、バーコードリーダー送受信部37と、カードリーダー送受信部38と、印刷装置記憶部39と、を備える。
通信制御部25、印刷データ通信部26、バーコードリーダーデータ通信部27、カードリーダーデータ通信部28、印刷制御部29、第1通信部30、第2通信部31、及び、第3通信部32の機能については後述する。
FIG. 3 is a block diagram showing a functional configuration of the printing apparatus 12, the POS terminal 8, the control server 10, and the management apparatus 14 according to the present embodiment.
In FIG. 3, functional blocks are displayed in blocks indicating the substrates (interface substrate 20 and printer substrate 21) in blocks indicating the printing device 12. This means that the function of one functional block is realized by hardware (CPU or the like) mounted on a substrate corresponding to the one functional block and predetermined software.
As shown in FIG. 3, the printing apparatus 12 includes an interface board 20 and a printer board 21, and these boards are a first connector 22 provided on the interface board 20 and a second connector provided on the printer board 21. Connected by a connector 23.
The interface board 20 of the printing apparatus 12 includes a communication control unit 25, a print data communication unit 26, a barcode reader data communication unit 27, a card reader data communication unit 28, a print control unit 29, and a first communication unit 30. The second communication unit 31, the third communication unit 32, the USB communication connection unit 34 (communication connection unit), the LAN communication connection unit 35 (communication connection unit), and the serial communication connection unit 36 (communication connection unit). A barcode reader transmission / reception unit 37, a card reader transmission / reception unit 38, and a printing device storage unit 39.
Communication control unit 25, print data communication unit 26, bar code reader data communication unit 27, card reader data communication unit 28, print control unit 29, first communication unit 30, second communication unit 31, and third communication unit 32 Will be described later.

ここで、POS端末8は、USB、イーサネット(登録商標)、又は、RS232C等のシリアル通信規格のいずれかの通信規格に従って印刷装置12と通信可能である。
USB通信接続部34は、図示しないUSBポートに接続され、USBケーブルを介して接続されたPOS端末8とUSBの規格で通信する。
また、LAN通信接続部35は、図示しないLANポートに接続され、LANケーブルを介して接続されたPOS端末8とイーサネットの規格で通信する。
また、シリアル通信接続部36は、図示しないシリアルポートに接続され、シリアルケーブルを介して接続されたPOS端末8とシリアル通信規格で通信する。
バーコードリーダー送受信部37は、バーコードリーダーデータ通信部27の制御で、所定の規格のポートに接続されたバーコードリーダーBRと、所定の規格で通信する。バーコードリーダーBRは、バーコードを光学的に読み取る装置である。
カードリーダー送受信部38は、カードリーダーデータ通信部28の制御で、所定の規格のポートに接続されたカードリーダーCRと、所定の規格で通信する。カードリーダーCRは、カードに記録された情報を読み取る装置である。
印刷装置記憶部39は、各種データを記憶する。印刷装置記憶部39は、第1通信先情報データ391a、第2通信先情報データ392a、第3通信先情報データ393a、及び、印刷装置識別情報データ39bを記憶するが、これらデータについては後述する。
印刷装置12のプリンター基板21は、プリンター制御部40を備える。プリンター制御部40の機能については、後述する。
また、印刷装置12は、印刷部41を備える。印刷装置12は、印刷媒体のロール紙がセットされる。印刷部41は、ロール紙に印刷する印刷機構、ロール紙を搬送する搬送機構、ロール紙を切断する切断機構等のレシートを発行する各種機構、装置を備える。
以下の説明では、印刷データ通信部26、バーコードリーダーデータ通信部27、及び、カードリーダーデータ通信部28を区別せずに表現する場合、これら機能ブロックを総称して「機能部」と表現する。
Here, the POS terminal 8 can communicate with the printing apparatus 12 according to any communication standard such as USB, Ethernet (registered trademark), or RS232C.
The USB communication connection unit 34 is connected to a USB port (not shown) and communicates with the POS terminal 8 connected via a USB cable according to the USB standard.
The LAN communication connection unit 35 is connected to a LAN port (not shown) and communicates with the POS terminal 8 connected via the LAN cable in accordance with the Ethernet standard.
The serial communication connection unit 36 is connected to a serial port (not shown) and communicates with the POS terminal 8 connected via a serial cable in accordance with the serial communication standard.
The barcode reader transmission / reception unit 37 communicates with a barcode reader BR connected to a port of a predetermined standard according to a predetermined standard under the control of the barcode reader data communication unit 27. The barcode reader BR is a device that optically reads a barcode.
The card reader transmission / reception unit 38 communicates with a card reader CR connected to a port with a predetermined standard under the control of the card reader data communication unit 28 with a predetermined standard. The card reader CR is a device that reads information recorded on a card.
The printing device storage unit 39 stores various data. The printing device storage unit 39 stores first communication destination information data 391a, second communication destination information data 392a, third communication destination information data 393a, and printing device identification information data 39b, which will be described later. .
The printer substrate 21 of the printing apparatus 12 includes a printer control unit 40. The function of the printer control unit 40 will be described later.
In addition, the printing apparatus 12 includes a printing unit 41. The printing apparatus 12 is loaded with a roll of printing medium. The printing unit 41 includes various mechanisms and devices for issuing receipts such as a printing mechanism for printing on roll paper, a transport mechanism for transporting roll paper, and a cutting mechanism for cutting roll paper.
In the following description, when the print data communication unit 26, the barcode reader data communication unit 27, and the card reader data communication unit 28 are expressed without distinction, these functional blocks are generically expressed as “functional unit”. .

図3に示すように、POS端末8は、POS端末制御部45(制御部)と、端末通信インターフェース46(通信部。以下、「端末通信I/F46」と表現する。)と、を備える。
POS端末制御部45は、CPUや、ROM、RAM、その他の回路等を備え、POS端末8を制御する。POS端末制御部45は、機能ブロックとして、POSアプリケーション実行部45a、及び、プリンタードライバー実行部45bを備える。
POSアプリケーション実行部45aの機能は、POS端末8にインストールされたPOSアプリケーションにより実行される。POSアプリケーション実行部45aは、レジカウンターRCで行われた会計に応じて、上述したバーコードリーダーや、カードリーダーからの入力、テンキー等の入力手段に対するレジ担当者の入力に基づいて、商品マスターや顧客マスターから情報を取得して、印刷に関する情報を含む印刷情報データを生成し、プリンタードライバー実行部45bに送信する。
プリンタードライバー実行部45bは、POS端末8にインストールされたプリンタードライバーの機能により実行される。プリンタードライバー実行部45bは、POSアプリケーション実行部45aから受信した印刷情報データに基づいて、印刷装置12の印刷部41のコマンド体系に従って印刷制御データを生成し、送信する。
端末通信I/F46は、POS端末制御部45の制御で、印刷装置12と所定の通信規格で通信する。
本実施形態では、POS端末制御部45と、印刷装置12とは、USBケーブルで接続され、USBの規格で通信する。
As shown in FIG. 3, the POS terminal 8 includes a POS terminal control unit 45 (control unit) and a terminal communication interface 46 (communication unit; hereinafter, expressed as “terminal communication I / F 46”).
The POS terminal control unit 45 includes a CPU, ROM, RAM, and other circuits, and controls the POS terminal 8. The POS terminal control unit 45 includes a POS application execution unit 45a and a printer driver execution unit 45b as functional blocks.
The function of the POS application execution unit 45a is executed by a POS application installed in the POS terminal 8. The POS application execution unit 45a, based on the transaction performed at the checkout counter RC, is based on the above-mentioned bar code reader, input from the card reader, input from the cashier in charge of input means such as a numeric keypad, Information is acquired from the customer master, print information data including information related to printing is generated, and transmitted to the printer driver execution unit 45b.
The printer driver execution unit 45 b is executed by the function of the printer driver installed in the POS terminal 8. Based on the print information data received from the POS application execution unit 45a, the printer driver execution unit 45b generates and transmits print control data according to the command system of the printing unit 41 of the printing apparatus 12.
The terminal communication I / F 46 communicates with the printing apparatus 12 according to a predetermined communication standard under the control of the POS terminal control unit 45.
In the present embodiment, the POS terminal control unit 45 and the printing apparatus 12 are connected by a USB cable and communicate according to the USB standard.

図3に示すように、制御サーバー10は、通信管理部50と、印刷データ処理部51と、バーコードリーダー処理部52と、カードリーダー処理部53と、第1接続部54と、第2接続部55と、第3接続部56と、制御サーバー記憶部57(記憶部)と、制御サーバー通信インターフェース58(以下、「制御サーバー通信I/F58」と表現する。)と、を備える。
通信管理部50、印刷データ処理部51、バーコードリーダー処理部52、カードリーダー処理部53、第1接続部54、第2接続部55、及び、第3接続部56の機能については後述する。
制御サーバー記憶部57は、各種データを記憶する。制御サーバー記憶部57は、コネクション管理データベース57a、印刷制御データデータベース57b(以下、「印刷制御データDB57b」と表現する。)、管理装置管理データベース57c(以下、「管理装置管理DB57c」と表現する。)、会員番号データデータベース57d(以下、「会員番号データDB57d」と表現する。)、及び、店舗情報管理データベース57e(以下、「店舗情報管理DB57e」と表現する。)を記憶する。これらデータについては後述する。
制御サーバー通信I/F58は、ネットワークGNを介して、管理装置14を含む外部機器と所定の通信規格で通信する。
As shown in FIG. 3, the control server 10 includes a communication management unit 50, a print data processing unit 51, a barcode reader processing unit 52, a card reader processing unit 53, a first connection unit 54, and a second connection. Unit 55, third connection unit 56, control server storage unit 57 (storage unit), and control server communication interface 58 (hereinafter referred to as “control server communication I / F 58”).
Functions of the communication management unit 50, the print data processing unit 51, the barcode reader processing unit 52, the card reader processing unit 53, the first connection unit 54, the second connection unit 55, and the third connection unit 56 will be described later.
The control server storage unit 57 stores various data. The control server storage unit 57 represents a connection management database 57a, a print control data database 57b (hereinafter referred to as “print control data DB 57b”), and a management device management database 57c (hereinafter referred to as “management device management DB 57c”). ), A member number data database 57d (hereinafter referred to as “member number data DB 57d”) and a store information management database 57e (hereinafter referred to as “store information management DB 57e”). These data will be described later.
The control server communication I / F 58 communicates with external devices including the management apparatus 14 according to a predetermined communication standard via the network GN.

図3に示すように、管理装置14は、管理装置制御部70と、管理装置通信インターフェース71(以下、「管理装置通信I/F71」と表現する。)と、管理装置記憶部72と、を備える。
管理装置制御部70は、CPUや、ROM、RAM、その他の周辺回路等を備え、管理装置14を制御する。
管理装置通信I/F71は、ネットワークGNを介して、制御サーバー10と通信する。
管理装置記憶部72は、各種データを記憶する。管理装置記憶部72は、条件データベース72aを記憶するが、これについては後述する。
As shown in FIG. 3, the management device 14 includes a management device control unit 70, a management device communication interface 71 (hereinafter referred to as “management device communication I / F 71”), and a management device storage unit 72. Prepare.
The management device control unit 70 includes a CPU, a ROM, a RAM, other peripheral circuits, and the like, and controls the management device 14.
The management device communication I / F 71 communicates with the control server 10 via the network GN.
The management device storage unit 72 stores various data. The management device storage unit 72 stores a condition database 72a, which will be described later.

なお、図3では、制御サーバー10と、制御サーバー10に接続された1つの印刷装置12との関係を示す。制御サーバー10に、複数の印刷装置12が接続される場合は、制御サーバー10は、複数の印刷装置12との間でWebSocketコネクションCTを確立し、印刷装置12とWebSocketコネクションCTでWebSocket通信する。   FIG. 3 shows the relationship between the control server 10 and one printing device 12 connected to the control server 10. When a plurality of printing apparatuses 12 are connected to the control server 10, the control server 10 establishes a WebSocket connection CT with the plurality of printing apparatuses 12, and performs WebSocket communication with the printing apparatus 12 through the WebSocket connection CT.

図3に示すように、印刷装置12は、印刷データ通信部26、バーコードリーダーデータ通信部27、及び、カードリーダーデータ通信部28の3つの機能部を備える。そして、印刷装置12と制御サーバー10との間では、3つの機能部に応じて、3つのWebSocketコネクションCTが確立される。具体的には、印刷データ通信部26に対応する第1WebSocketコネクションCT1、カードリーダーデータ通信部28に対応する第2WebSocketコネクションCT2、及び、バーコードリーダーデータ通信部27に対応する第3WebSocketコネクションCT3が確立される。
以下、WebSocketコネクションCTの確立時の印刷装置12、及び、制御サーバー10の動作について、第3WebSocketコネクションCT3を確立する場合を例にして説明する。
図4は、第3WebSocketコネクションCT3の確立時の印刷装置12、及び、制御サーバー10の動作を示すフローチャートである。(A)は印刷装置12の動作を示し、(B)は制御サーバー10の動作を示す。
以下の説明では、フローチャートの開始時点で、印刷装置12は、対応する店舗システム11のローカルエリアネットワークLNに接続され、ネットワークGNにアクセス可能である。
また、図4に示すフローチャートが示す動作は、印刷装置12の電源がオンされた場合や、印刷装置12がネットワークGNに通信可能に接続された場合、ユーザーから指示があった場合等に実行される。
As shown in FIG. 3, the printing apparatus 12 includes three functional units: a print data communication unit 26, a barcode reader data communication unit 27, and a card reader data communication unit 28. Then, three WebSocket connections CT are established between the printing apparatus 12 and the control server 10 according to the three functional units. Specifically, a first WebSocket connection CT1 corresponding to the print data communication unit 26, a second WebSocket connection CT2 corresponding to the card reader data communication unit 28, and a third WebSocket connection CT3 corresponding to the barcode reader data communication unit 27 are established. Is done.
Hereinafter, the operations of the printing apparatus 12 and the control server 10 when the WebSocket connection CT is established will be described using a case where the third WebSocket connection CT3 is established as an example.
FIG. 4 is a flowchart showing operations of the printing apparatus 12 and the control server 10 when the third WebSocket connection CT3 is established. (A) shows the operation of the printing apparatus 12, and (B) shows the operation of the control server 10.
In the following description, at the start of the flowchart, the printing device 12 is connected to the local area network LN of the corresponding store system 11 and can access the network GN.
4 is executed when the power of the printing apparatus 12 is turned on, when the printing apparatus 12 is connected to the network GN, or when an instruction is given from the user. The

また、以下の説明において、印刷装置12が備える通信制御部25、印刷データ通信部26、バーコードリーダーデータ通信部27、カードリーダーデータ通信部28、印刷制御部29、及び、制御サーバー10が備える印刷データ処理部51、バーコードリーダー処理部52、カードリーダー処理部53の機能は、以下のようにして実現される。
例えば、これら機能ブロックは、オブジェクトである。オブジェクトとは、オブジェクト指向プログラミングで生成されるインスタンス、すなわち、データ及びメソッドの集合として定義された機能ブロックである。そして、これら機能ブロックの機能は、機能ブロックに実装されたメソッドが呼び出されることによって実行される。
また、これら機能ブロックの機能は、アプリケーションがCPU等のハードウェアによって読み出され実行されることによって、実行される。1つのアプリケーションにより1つの機能ブロックの機能が実行される構成であってもよい。また、1つのアプリケーションにより複数の機能ブロックの機能が実行される構成であってもよい。また、複数のアプリケーションにより1つの機能ブロックの機能が実行される構成であってもよい。
機能ブロックは、機能をブロックとして表現したものであり、特定のアプリケーションや、ハードウェア等を意味するものではない。
In the following description, the communication control unit 25, the print data communication unit 26, the barcode reader data communication unit 27, the card reader data communication unit 28, the print control unit 29, and the control server 10 included in the printing apparatus 12 are provided. The functions of the print data processing unit 51, the barcode reader processing unit 52, and the card reader processing unit 53 are realized as follows.
For example, these functional blocks are objects. An object is an instance generated by object-oriented programming, that is, a functional block defined as a collection of data and methods. The functions of these functional blocks are executed by calling a method implemented in the functional block.
The functions of these functional blocks are executed when the application is read and executed by hardware such as a CPU. A configuration in which one function block function is executed by one application may be employed. Moreover, the structure by which the function of a some functional block is performed by one application may be sufficient. Moreover, the structure by which the function of one functional block is performed by a some application may be sufficient.
A functional block represents a function as a block, and does not mean a specific application, hardware, or the like.

図4(A)に示すように、印刷装置12のバーコードリーダーデータ通信部27は、バーコードリーダーBRと通信可能となったか否かを監視する(ステップSA1)。
バーコードリーダーデータ通信部27とバーコードリーダーBRとが通信可能となる場合とは、印刷装置12にバーコードリーダーBRが接続された場合である。また、バーコードリーダーBRが電源を有する場合は、接続されたバーコードリーダーBRの電源がオンとなった場合である。
バーコードリーダーBRと通信可能となった場合(ステップSA1)、バーコードリーダーデータ通信部27は、印刷装置記憶部39にアクセスし、印刷装置記憶部39が記憶する第3通信先情報データ393aを取得する(ステップSA2)。
第3通信先情報データ393aは、第3WebSocketコネクションCT3を確立する際に、アクセスする制御サーバー10のアドレス(ドメイン名、IPアドレス、パス名等。)を示すデータである。ここで、WebSocketで、WebSocketコネクションCTの確立時に、クライアント(本例では、印刷装置12)は、サーバー(本例では、制御サーバー10)に対して、HTTP(Hypertext Transfer Protocol)に基づくハンドシェイクを行う。ハンドシェイクで、クライアントは、サーバーのアドレスが含まれるメッセージ等のメッセージを送信するが、第3通信先情報データ393aは、アクセス先のアドレスが含まれる。
印刷装置12の機能部に応じて、WebSocketコネクションCTを確立するときのアクセス先のアドレスが異なる。本例では、印刷制御部17と、バーコードリーダーデータ通信部27と、カードリーダーデータ通信部28とは、種類が異なる機能部である。そして、印刷データ通信部26が第1WebSocketコネクションCT1を確立するときにアクセスするアドレスと、カードリーダーデータ通信部28が第2WebSocketコネクションCT2を確立するときにアクセスするアドレスと、バーコードリーダーデータ通信部27が第3WebSocketコネクションCT3を確立するときにアクセスするアドレスは異なる。印刷装置記憶部39は、第1通信先情報データ391a、第2通信先情報データ392a、及び、第3通信先情報データ393aを記憶する。第1通信先情報データ391aは印刷データ通信部26が第1WebSocketコネクションCT1を確立するときにアクセスするアドレスを含む。第2通信先情報データ392aはカードリーダーデータ通信部28が第2WebSocketコネクションCT2を確立するときにアクセスするアドレスを含む。第3通信先情報データ393aはバーコードリーダーデータ通信部27が第3WebSocketコネクションCT3を確立するときにアクセスするアドレスを含む。
As shown in FIG. 4A, the barcode reader data communication unit 27 of the printing apparatus 12 monitors whether or not communication with the barcode reader BR is possible (step SA1).
The barcode reader data communication unit 27 and the barcode reader BR can communicate with each other when the barcode reader BR is connected to the printing apparatus 12. Further, the barcode reader BR has a power source when the connected barcode reader BR is powered on.
When communication with the barcode reader BR becomes possible (step SA1), the barcode reader data communication unit 27 accesses the printing device storage unit 39 and stores the third communication destination information data 393a stored in the printing device storage unit 39. Obtain (step SA2).
The third communication destination information data 393a is data indicating the address (domain name, IP address, path name, etc.) of the control server 10 to be accessed when the third WebSocket connection CT3 is established. Here, when the WebSocket connection CT is established with WebSocket, the client (printing apparatus 12 in this example) performs a handshake based on HTTP (Hypertext Transfer Protocol) to the server (Control Server 10 in this example). Do. In the handshake, the client transmits a message such as a message including the server address, but the third communication destination information data 393a includes the access destination address.
The address of the access destination when establishing the WebSocket connection CT differs depending on the function unit of the printing apparatus 12. In this example, the print control unit 17, the barcode reader data communication unit 27, and the card reader data communication unit 28 are different types of functional units. The address accessed when the print data communication unit 26 establishes the first WebSocket connection CT1, the address accessed when the card reader data communication unit 28 establishes the second WebSocket connection CT2, and the barcode reader data communication unit 27. Accesses different addresses when establishing the third WebSocket connection CT3. The printing device storage unit 39 stores first communication destination information data 391a, second communication destination information data 392a, and third communication destination information data 393a. The first communication destination information data 391a includes an address accessed when the print data communication unit 26 establishes the first WebSocket connection CT1. The second communication destination information data 392a includes an address that the card reader data communication unit 28 accesses when establishing the second WebSocket connection CT2. The third communication destination information data 393a includes an address that the barcode reader data communication unit 27 accesses when establishing the third WebSocket connection CT3.

次いで、バーコードリーダーデータ通信部27は、第3通信先情報データ393aが示すアドレスに基づいて制御サーバー10にアクセスする。そして、バーコードリーダーデータ通信部27は、制御サーバー10のバーコードリーダー処理部52と、第3通信部32と第3接続部56との間に、第3WebSocketコネクションCT3を確立する(ステップSA3、ステップSB1)。印刷装置12のバーコードリーダーデータ通信部27は、制御サーバー10からの要求を受けることなく、バーコードリーダーBRと通信可能となったことをトリガーとして第3WebSocketコネクションCT3を確立する。
第3通信部32、及び、第3接続部56は、WebSocketの規格、手続きに従ってデータの送受信を行うWebSocketインターフェースである。これら機能ブロックは、例えば、WebSocketのSocketライブラリーを用いて生成される。
第3通信部32は、バーコードリーダーデータ通信部27から受信したデータについて、WebSocketの規格に従って処理を行い、WebSocketの手続きで第3WebSocketコネクションCT3によりデータを送信する機能を有する。また、第3通信部32は、第3WebSocketコネクションCT3により受信したデータについて、WebSocketに従った処理を行って、バーコードリーダーデータ通信部27に送信する機能を有する。第1通信部30、第2通信部31、第1接続部54、第2接続部55、及び、第3接続部56についても同様である。
Next, the barcode reader data communication unit 27 accesses the control server 10 based on the address indicated by the third communication destination information data 393a. Then, the barcode reader data communication unit 27 establishes a third WebSocket connection CT3 between the barcode reader processing unit 52 of the control server 10, the third communication unit 32, and the third connection unit 56 (step SA3, Step SB1). The bar code reader data communication unit 27 of the printing apparatus 12 establishes the third WebSocket connection CT3 triggered by the fact that it can communicate with the bar code reader BR without receiving a request from the control server 10.
The third communication unit 32 and the third connection unit 56 are WebSocket interfaces that transmit and receive data according to WebSocket standards and procedures. These functional blocks are generated using, for example, a socket library of WebSocket.
The third communication unit 32 has a function of processing the data received from the barcode reader data communication unit 27 in accordance with the WebSocket standard and transmitting the data through the third WebSocket connection CT3 in the WebSocket procedure. In addition, the third communication unit 32 has a function of performing processing according to WebSocket on the data received through the third WebSocket connection CT3 and transmitting the data to the barcode reader data communication unit 27. The same applies to the first communication unit 30, the second communication unit 31, the first connection unit 54, the second connection unit 55, and the third connection unit 56.

次いで、バーコードリーダーデータ通信部27は、印刷装置記憶部39にアクセスし、印刷装置記憶部39が記憶する印刷装置識別情報データ39bを取得する(ステップSA4)。印刷装置識別情報データ39bは、印刷装置12の識別情報(以下、「印刷装置識別情報」という。)を示すデータである。印刷装置識別情報は、例えば、印刷装置12の製造段階で、印刷装置12に割り当てられるシリアル番号である。
次いで、バーコードリーダーデータ通信部27は、印刷装置識別情報データ39bを第3通信部32に送信する(ステップSA5)。
第3通信部32は、受信した印刷装置識別情報データ39bを、第3WebSocketコネクションCT3で、制御サーバー10に送信する(ステップSA6)。
Next, the barcode reader data communication unit 27 accesses the printing device storage unit 39 and acquires the printing device identification information data 39b stored in the printing device storage unit 39 (step SA4). The printing apparatus identification information data 39b is data indicating identification information of the printing apparatus 12 (hereinafter referred to as “printing apparatus identification information”). The printing device identification information is, for example, a serial number assigned to the printing device 12 at the manufacturing stage of the printing device 12.
Next, the barcode reader data communication unit 27 transmits the printing apparatus identification information data 39b to the third communication unit 32 (step SA5).
The third communication unit 32 transmits the received printing apparatus identification information data 39b to the control server 10 through the third WebSocket connection CT3 (Step SA6).

図4(B)に示すように、制御サーバー10の第3接続部56は、第3WebSocketコネクションCT3で、印刷装置識別情報データ39bを受信する(ステップSB2)。次いで、第3接続部56は、受信した印刷装置識別情報データ39bを通信管理部50に送信する(ステップSB3)。
通信管理部50は、制御サーバー記憶部57が記憶するコネクション管理データベース57aにアクセスする(ステップSB4)。コネクション管理データベース57aは、印刷装置12との間で確立しているWebSocketコネクションCTについて、WebSocketコネクションCTの識別情報であるコネクション識別情報と、印刷装置12の印刷装置識別情報とを対応付けて記憶するデータベースである。次いで、通信管理部50は、コネクション管理データベース57aに1件のレコードを生成する。そして、通信管理部50は、生成したレコードにおいて、ステップSB1で確立したWebSocketコネクションCT(本例では、第3WebSocketコネクションCT3)のコネクション識別情報と、受信した印刷装置識別情報データ39bが示す印刷装置識別情報とを対応付けて記憶する(ステップSB5)。通信管理部50は、WebSocketコネクションCTが確立したときに、既に確立しているWebSocketコネクションCTのコネクション識別情報と異なる値のコネクション識別情報を生成する。ステップSB5の処理により、WebSocketコネクションCTと、印刷装置12との対応関係が管理される。
このように、印刷装置12のバーコードリーダーデータ通信部27は、制御サーバー10からの要求を受けることなく、バーコードリーダーBRと通信可能となったことをトリガーとして第3WebSocketコネクションCT3を確立する。このような構成のため、ユーザーは、第3WebSocketコネクションCT3を確立するために、煩雑な作業を行う必要がない。また、ユーザーは、WebSocketコネクションCTを確立するために、専門的な知識も必要ない。
また、バーコードリーダーBRが通信可能となり、バーコードリーダーBRからバーコードリーダーデータ通信部27に対してデータが送信される可能性が生じた後に、第3WebSocketコネクションCT3が確立される。このため、不必要に第3WebSocketコネクションCT3を確立する処理が行われず、また、不必要に第3WebSocketコネクションCT3が確立された状態が維持されず、リソースの有効活用を実現できる。
As shown in FIG. 4B, the third connection unit 56 of the control server 10 receives the printing apparatus identification information data 39b through the third WebSocket connection CT3 (step SB2). Next, the third connection unit 56 transmits the received printing apparatus identification information data 39b to the communication management unit 50 (step SB3).
The communication management unit 50 accesses the connection management database 57a stored in the control server storage unit 57 (step SB4). For the WebSocket connection CT established with the printing apparatus 12, the connection management database 57 a stores connection identification information that is identification information of the WebSocket connection CT and printing apparatus identification information of the printing apparatus 12 in association with each other. It is a database. Next, the communication management unit 50 generates one record in the connection management database 57a. Then, in the generated record, the communication management unit 50 connects the connection identification information of the WebSocket connection CT established in step SB1 (in this example, the third WebSocket connection CT3) and the printing device identification indicated by the received printing device identification information data 39b. Information is stored in association with each other (step SB5). When the WebSocket connection CT is established, the communication management unit 50 generates connection identification information having a value different from the connection identification information of the already established WebSocket connection CT. By the processing in step SB5, the correspondence relationship between the WebSocket connection CT and the printing apparatus 12 is managed.
In this way, the barcode reader data communication unit 27 of the printing apparatus 12 establishes the third WebSocket connection CT3 using a trigger that the communication with the barcode reader BR is possible without receiving a request from the control server 10. Due to such a configuration, the user does not need to perform complicated work in order to establish the third WebSocket connection CT3. In addition, the user does not need specialized knowledge to establish the WebSocket connection CT.
Further, after the barcode reader BR becomes communicable and there is a possibility that data is transmitted from the barcode reader BR to the barcode reader data communication unit 27, the third WebSocket connection CT3 is established. For this reason, the process of establishing the third WebSocket connection CT3 unnecessarily is not performed, and the state where the third WebSocket connection CT3 is unnecessarily established is not maintained, so that effective use of resources can be realized.

以上、第3WebSocketコネクションCT3確立時の印刷装置12及び制御サーバー10の動作を説明したが、第1WebSocketコネクションCT1、及び、第2WebSocketコネクションCT2の確立時も同様の処理が行われる。
以下、第1WebSocketコネクションCT1の確立時の処理について説明する。
印刷装置12の電源がオンされると、印刷データ通信部26は、通信制御部25からデータを受信したか否かを監視する。通信制御部25が印刷データ通信部26にデータを送信する処理については後に詳述する。
印刷装置12の電源のオン後に、通信制御部25から印刷制御データを受信した場合、印刷データ通信部26は、制御サーバー10の印刷データ処理部51と、第1通信部30と第1接続部54との間に第1WebSocketコネクションCT1を確立する。当該コネクションの確立に応じて、通信管理部50は、コネクション管理データベース57aに、当該コネクションのコネクション識別情報と、印刷装置12の印刷装置識別情報とを対応付けて記憶する。
このように、印刷装置12の印刷データ通信部26は、電源のオン後に通信制御部25からデータを受信したことをトリガーとして、第1WebSocketコネクションCT1を確立する。当該コネクションの確立後は、印刷データ通信部26は、当該コネクションにより、データの送受信を行う。
次に、第2WebSocketコネクションCT2の確立時の処理について、図4のフローチャートを援用して説明する。
図4(A)のステップSA1において、印刷装置12のカードリーダーデータ通信部28は、カードリーダーCRと通信可能となったか否かを監視する。カードリーダーデータ通信部28とカードリーダーCRとが通信可能となる場合とは、例えば、印刷装置12にカードリーダーCRが接続された場合である。また、カードリーダーCRが電源を有する場合は、接続されたカードリーダーCRの電源がオンとなった場合である。
カードリーダーCRが通信可能となった場合(ステップSA1:YES)、カードリーダーデータ通信部28は、上記で説明した方法と同様の方法で、第2WebSocketコネクションCT2を確立する。制御サーバー10の通信管理部50は、コネクション管理データベース57aに、第2WebSocketコネクションCT2のコネクション識別情報と印刷装置12の印刷装置識別情報とを対応付けて記憶する。
The operation of the printing apparatus 12 and the control server 10 when the third WebSocket connection CT3 is established has been described above, but the same processing is performed when the first WebSocket connection CT1 and the second WebSocket connection CT2 are established.
Hereinafter, a process when establishing the first WebSocket connection CT1 will be described.
When the printing apparatus 12 is turned on, the print data communication unit 26 monitors whether data has been received from the communication control unit 25. A process in which the communication control unit 25 transmits data to the print data communication unit 26 will be described in detail later.
When print control data is received from the communication control unit 25 after the printing apparatus 12 is turned on, the print data communication unit 26 includes the print data processing unit 51 of the control server 10, the first communication unit 30, and the first connection unit. 54 establishes the first WebSocket connection CT1. In response to the establishment of the connection, the communication management unit 50 stores the connection identification information of the connection and the printing device identification information of the printing device 12 in association with each other in the connection management database 57a.
As described above, the print data communication unit 26 of the printing apparatus 12 establishes the first WebSocket connection CT1 using the reception of data from the communication control unit 25 after the power is turned on as a trigger. After the connection is established, the print data communication unit 26 transmits and receives data through the connection.
Next, processing at the time of establishing the second WebSocket connection CT2 will be described with reference to the flowchart of FIG.
In step SA1 of FIG. 4A, the card reader data communication unit 28 of the printing apparatus 12 monitors whether or not communication with the card reader CR is possible. The case where the card reader data communication unit 28 and the card reader CR can communicate with each other is, for example, a case where the card reader CR is connected to the printing apparatus 12. Further, when the card reader CR has a power source, the connected card reader CR is powered on.
When the card reader CR becomes communicable (step SA1: YES), the card reader data communication unit 28 establishes the second WebSocket connection CT2 by the same method as described above. The communication management unit 50 of the control server 10 stores the connection identification information of the second WebSocket connection CT2 and the printing apparatus identification information of the printing apparatus 12 in association with each other in the connection management database 57a.

このように、印刷装置12と制御サーバー10との間で、機能部ごとにWebSocketコネクションCTが確立される。このため、1の機能部は、制御サーバー10の対応する処理部との間でのデータの送受信を、他の機能部とは独立して、当該他の処理部の通信に影響を受けることなく、また、影響を与えることなく実行できる。   In this way, a WebSocket connection CT is established for each functional unit between the printing apparatus 12 and the control server 10. For this reason, one function unit transmits and receives data to and from the corresponding processing unit of the control server 10 without being affected by the communication of the other processing unit independently of the other function unit. Also, it can be executed without any influence.

以上のようにして、第1通信部30と、第1接続部54との間で、第1WebSocketコネクションCT1が確立する。
これに伴って、印刷装置12の印刷データ通信部26と制御サーバー10の印刷データ処理部51との間で、第1WebSocketコネクションCT1に基づく第1機能部間通信経路KT1が確立する。第1機能部間通信経路KT1は、印刷データ通信部26と印刷データ処理部51との間で通信するデータを送受信する論理的な通信経路である。印刷データ通信部26と印刷データ処理部51とは、第1機能部間通信経路KT1により、非同期な双方向通信を行う。第1機能部間通信経路KT1により行われる非同期な双方向通信については後述する。
同様に、第2WebSocketコネクションCT2の確立で、印刷装置12のカードリーダーデータ通信部28と制御サーバー10のカードリーダー処理部53との間で、第2機能部間通信経路KT2が確立する。カードリーダーデータ通信部28とカードリーダー処理部53とは、第2機能部間通信経路KT2により、非同期な双方向通信を行う。
また同様に、第3WebSocketコネクションCT3の確立で、印刷装置12のバーコードリーダーデータ通信部27と制御サーバー10のバーコードリーダー処理部52との間で、第3機能部間通信経路KT3が確立する。バーコードリーダーデータ通信部27とバーコードリーダー処理部52とは、第3機能部間通信経路KT3により、非同期な双方向通信を行う。
As described above, the first WebSocket connection CT1 is established between the first communication unit 30 and the first connection unit 54.
Accordingly, a first inter-function unit communication path KT1 based on the first WebSocket connection CT1 is established between the print data communication unit 26 of the printing apparatus 12 and the print data processing unit 51 of the control server 10. The first inter-function unit communication path KT1 is a logical communication path for transmitting and receiving data communicated between the print data communication unit 26 and the print data processing unit 51. The print data communication unit 26 and the print data processing unit 51 perform asynchronous two-way communication through the first inter-function unit communication path KT1. Asynchronous bidirectional communication performed by the first functional unit communication path KT1 will be described later.
Similarly, by establishing the second WebSocket connection CT2, a communication path KT2 between the second functional units is established between the card reader data communication unit 28 of the printing apparatus 12 and the card reader processing unit 53 of the control server 10. The card reader data communication unit 28 and the card reader processing unit 53 perform asynchronous two-way communication via the second functional unit communication path KT2.
Similarly, when the third WebSocket connection CT3 is established, the third functional unit communication path KT3 is established between the barcode reader data communication unit 27 of the printing apparatus 12 and the barcode reader processing unit 52 of the control server 10. . The barcode reader data communication unit 27 and the barcode reader processing unit 52 perform asynchronous two-way communication via the third functional unit communication path KT3.

POS制御システム1は、印刷装置12、及び、POS端末8により構成された既存のシステムを用いて構築される。既存のシステムでは、POS端末8は、POSアプリケーション、及び、プリンタードライバーの機能により、印刷制御データを生成し、印刷装置12に送信する。印刷装置12は、印刷制御データに基づいて、印刷部41により印刷を実行する。
そして、POS制御システム1は、POS端末8に改変(例えば、POSアプリケーションのプログラム修正)を加えることなく、POS端末8が印刷装置12に送信する印刷制御データを用いることを目的の1つとする。
より詳細には、POS制御システム1で、印刷装置12にインターフェース基板20が搭載されることにより、印刷装置12に拡張機能を有する。印刷装置12は、拡張機能により、ネットワークGNを介して印刷制御データを制御サーバー10に送信する。また、制御サーバー10は、受信した印刷制御データに基づいて、後述する各種処理を実行する。
以下、POS端末8が送信する印刷制御データの内容について例を挙げて説明し、次に、制御サーバー10が備える各装置の印刷制御データに基づく処理について説明する。
The POS control system 1 is constructed by using an existing system constituted by the printing device 12 and the POS terminal 8. In the existing system, the POS terminal 8 generates print control data by the POS application and the function of the printer driver, and transmits the print control data to the printing apparatus 12. The printing apparatus 12 performs printing by the printing unit 41 based on the print control data.
The POS control system 1 uses the print control data transmitted from the POS terminal 8 to the printing device 12 without modifying the POS terminal 8 (for example, modifying the POS application program).
More specifically, in the POS control system 1, the interface board 20 is mounted on the printing apparatus 12, so that the printing apparatus 12 has an extended function. The printing apparatus 12 transmits print control data to the control server 10 via the network GN by the extended function. Further, the control server 10 executes various processes to be described later based on the received print control data.
Hereinafter, the contents of the print control data transmitted by the POS terminal 8 will be described by way of example, and then processing based on the print control data of each device provided in the control server 10 will be described.

図5(A)は、印刷装置12によって発行されるレシートの一例を示す図である。また、図5(B)は、(A)が示すレシートを発行させる印刷制御データの内容を示す図である。
図5(A)に示すように、レシートの先頭に、トップロゴを示すトップロゴ画像R1が印刷される。
トップロゴ画像R1の下方に、レシートが発行された日時(日付、及び、時刻)を示す発行日時画像R2が印刷される。発行日時画像R2が示す文字列(日時を示す文字列)は、右寄せで印刷される。
発行日時画像R2の下方に、購入商品関連画像R3が印刷される。購入商品関連画像R3は、顧客が購入した商品について、顧客が購入した商品の名称、商品の単価、商品の購入数量、および、商品の購入金額(商品の単価×商品の購入数量によって算出される金額)を一覧表示する画像である。購入商品関連画像R3において、1行の文字列は、左寄せで印刷される。
購入商品関連画像R3の下方に、購入商品の合計金額を示す合計金額画像R4が印刷される。合計金額画像R4に係る文字列は、左寄せで、太字で印刷される。
合計金額画像R4の下方に、レシートの識別番号のバーコードを示すバーコード画像R5が印刷される。
バーコード画像R5の下方に、顧客の会員番号を示す会員番号画像R6が印刷される。会員番号画像R6が示す文字列は、左寄せで印刷される。ここで、上述したように、POS端末8に、顧客が所有する会員カードを読み取るカードリーダーが接続される。そして、レジカウンターRCにおける会計に際し、顧客が会員カードを提示した場合、当該会員カードがカードリーダーによって読み取られる。カードリーダーによって読み取られた会員番号が、POS端末8の所定の記憶領域に記憶される。
会員番号画像R6の下方に、レシートの末端に定型的に記録される文字列を示す末端画像R7が印刷される。本例では、末端画像R7が示す文字列は、「Thank△You」(△は、スペースを表わす。以下同じ。)である。末端画像R7が示す文字列は、中央寄せで印刷される。
なお、図5(A)では、レシートのレイアウトを単純化している。通常、レシートには、税に関する情報や、おつりに関する情報等、上記で示した以外の情報が印刷される。
FIG. 5A is a diagram illustrating an example of a receipt issued by the printing apparatus 12. FIG. 5B is a diagram showing the contents of print control data for issuing the receipt shown in FIG.
As shown in FIG. 5A, a top logo image R1 indicating the top logo is printed at the top of the receipt.
Below the top logo image R1, an issue date image R2 indicating the date and time (date and time) when the receipt was issued is printed. The character string (character string indicating the date and time) indicated by the issue date and time image R2 is printed right-justified.
A purchase merchandise related image R3 is printed below the issue date image R2. The purchased product related image R3 is calculated based on the product purchased by the customer by the name of the product purchased by the customer, the unit price of the product, the purchase quantity of the product, and the purchase price of the product (product unit price × product purchase quantity). (Amount of money) is a list display image. In the purchased product related image R3, the character string of one line is printed left-justified.
Below the purchased product-related image R3, a total price image R4 indicating the total price of the purchased product is printed. The character string related to the total amount image R4 is printed in bold and left-justified.
Below the total amount image R4, a barcode image R5 showing the barcode of the receipt identification number is printed.
Below the barcode image R5, a membership number image R6 indicating the membership number of the customer is printed. The character string indicated by the member number image R6 is printed left-justified. Here, as described above, the card reader for reading the membership card owned by the customer is connected to the POS terminal 8. When the customer presents a membership card at the time of payment at the cashier counter RC, the membership card is read by the card reader. The membership number read by the card reader is stored in a predetermined storage area of the POS terminal 8.
Below the member number image R6, a terminal image R7 indicating a character string that is routinely recorded at the terminal of the receipt is printed. In this example, the character string indicated by the terminal image R7 is “ThankΔYou” (Δ represents a space. The same applies hereinafter). The character string indicated by the end image R7 is printed center-aligned.
In FIG. 5A, the receipt layout is simplified. Normally, information other than those described above, such as information on tax and information on change, is printed on the receipt.

図5(B)に示すように、印刷制御データは、複数のコマンドを含んで構成される。
図5(B)に示すように、印刷制御データは、トップロゴ印刷指示コマンドC1を含む。このトップロゴ印刷指示コマンドC1は、トップロゴ画像R1の印刷を指示するコマンドである。トップロゴ印刷指示コマンドC1は、グラフィック画像印刷指示コマンドGCを含んで構成される。グラフィック画像印刷指示コマンドGCは、グラフィック画像の印刷を指示する命令コードと、印刷するグラフィック画像の画像データと、を含んで構成される。画像データは、ビットマップデータ等の、画素ごとに、色の情報を階調値として保持するデータである。グラフィック画像印刷指示コマンドGCは、「XXX“画像データ”」(ただし、「XXX」は、画像データに基づく画像の印刷を指示する命令コード。)という構成である。本例のトップロゴ印刷指示コマンドC1に係るグラフィック画像印刷指示コマンドGCは、「XXX“トップロゴ画像R1の画像データ”」という構成である。
As shown in FIG. 5B, the print control data includes a plurality of commands.
As shown in FIG. 5B, the print control data includes a top logo print instruction command C1. The top logo printing instruction command C1 is a command for instructing printing of the top logo image R1. The top logo print instruction command C1 includes a graphic image print instruction command GC. The graphic image print instruction command GC includes an instruction code for instructing printing of a graphic image and image data of the graphic image to be printed. The image data is data that holds color information as gradation values for each pixel, such as bitmap data. The graphic image print instruction command GC has a configuration of “XXX“ image data ”” (where “XXX” is an instruction code for instructing printing of an image based on the image data). The graphic image print instruction command GC related to the top logo print instruction command C1 of this example has a configuration of “XXX“ image data of the top logo image R1 ””.

印刷制御データにおいて、トップロゴ印刷指示コマンドC1の次には、発行日時印刷指示コマンドC2が設けられる。発行日時印刷指示コマンドC2は、発行日時画像R2の印刷を指示するコマンドであり、文字列装飾コマンドSC、文字列印刷指示コマンドMC、及び、改行コマンドLFを含んで構成される。
文字列装飾コマンドSCは、文字列印刷指示コマンドMCが指定する文字列に付加する装飾を指定するコマンドである。装飾は、印刷する文字列に対して描画に関する何らかの処理を行うことを意味する。装飾としては、例えば、文字列の位置の移動(左寄せや、中央寄せ、右寄せ等)、文字列の拡大、縮小、回転、強調、太字化、装飾文字又は装飾記号の付加等がある。本例の発行日時印刷指示コマンドC2に係る文字列装飾コマンドSCは、印刷する文字列について、右寄せの装飾を行うことを指示する。
文字列印刷指示コマンドMCは、文字列を指定し、指定した文字列の印刷を指示するコマンドである。文字列印刷指示コマンドMCは、文字列の印刷を指示する命令コードと、文字列を指定するデータ部と、を含んで構成される。データ部は、所定の文字コード(例えば、Unicodeや、アスキーコード)によって表現された文字の組み合わせが含まれる。本例の発行日時印刷指示コマンドC2に係る文字列印刷指示コマンドMCは、「YYY“2013/1/1/12:00”」(ただし、「YYY」は、文字列の記録を指示する命令コードである。ダブルクォーテーション内は、データ部であり、印刷する文字列が指定される。)という構成である。印刷装置12によって印刷可能な文字について、各文字のフォントデータが印刷装置12に登録される。印刷装置12のプリンター制御部40は、文字列印刷指示コマンドMCに基づいて、印刷する各文字をフォントデータに変換し、変換したフォントデータに基づいて印刷を行う。
改行コマンドLFは、改行を指示するコマンドである。
In the print control data, an issue date print instruction command C2 is provided after the top logo print instruction command C1. The issue date / time print instruction command C2 is a command for instructing printing of the issue date / time image R2, and includes a character string decoration command SC, a character string print instruction command MC, and a line feed command LF.
The character string decoration command SC is a command for designating decorations to be added to the character string designated by the character string print instruction command MC. The decoration means that some processing related to drawing is performed on a character string to be printed. Examples of the decoration include movement of the position of the character string (left alignment, center alignment, right alignment, etc.), enlargement, reduction, rotation, emphasis, bolding of the character string, addition of a decoration character or a decoration symbol, and the like. The character string decoration command SC related to the issue date / time printing instruction command C2 in this example instructs to perform right-justified decoration on the character string to be printed.
The character string print instruction command MC is a command for designating a character string and instructing printing of the designated character string. The character string print instruction command MC includes an instruction code for instructing printing of a character string and a data portion for designating the character string. The data part includes a combination of characters expressed by a predetermined character code (for example, Unicode or ASCII code). The character string print instruction command MC related to the issue date / time print instruction command C2 of this example is “YYY“ 2013/1/1/12: 00 ”(where“ YYY ”is an instruction code for instructing recording of a character string). The double quotes are the data part, and the character string to be printed is specified.) For characters that can be printed by the printing device 12, font data of each character is registered in the printing device 12. The printer control unit 40 of the printing apparatus 12 converts each character to be printed into font data based on the character string print instruction command MC, and performs printing based on the converted font data.
The line feed command LF is a command for instructing a line feed.

印刷制御データにおいて、発行日時印刷指示コマンドC2の次には、明細印刷指示コマンドC3が設けられる。明細印刷指示コマンドC3は、購入商品に対して存在する。
明細印刷指示コマンドC3は、左寄せの装飾を指示する文字列装飾コマンドSCを含む。また、明細印刷指示コマンドC3は、商品の名称、商品の単価、購入数量、および、購入金額を表わす文字列を指定して、当該文字列の印刷を指示する文字列印刷指示コマンドMCと、改行コマンドLFとを含む。
印刷制御データにおいて、明細印刷指示コマンドC3の次には、合計金額印刷指示コマンドC4が設けられる。合計金額印刷指示コマンドC4は、太字化、および、左寄せの装飾を指示する文字列装飾コマンドSCを含む。また、合計金額印刷指示コマンドC4は、文字列「Total」、及び、合計金額を示す文字列を指定して、当該文字列の印刷を指示する文字列印刷指示コマンドMCと、改行コマンドLFとを含む。
印刷制御データにおいて、合計金額印刷指示コマンドC4の次には、バーコード印刷指示コマンドC5が設けられる。バーコード印刷指示コマンドC5は、コードを指定し、指定したコードを示すバーコード画像R5を印刷することを指示するコマンドである。印刷装置12には、バーコード印刷指示コマンドC5が指定するコードに基づいて、バーコードの画像データを生成し、生成した画像データに基づいて、バーコード画像R5を印刷する機能を含む。
印刷制御データにおいて、バーコード印刷指示コマンドC5の次には、会員番号印刷指示コマンドC6が含まれる。会員番号印刷指示コマンドC6は、左寄せの装飾を指示する文字列装飾コマンドSCを含む。また、会員番号印刷指示コマンドC6は、「membership△NO.」という文字列、および、会員番号を示す文字列を指定して、当該文字列の印刷を指示する文字列印刷指示コマンドMCと、改行コマンドLFとを含む。
印刷制御データにおいて、会員番号印刷指示コマンドC6の次には、末端画像印刷指示コマンドC7を含む。末端画像印刷指示コマンドC7は、中央寄せの装飾を指示する文字列装飾コマンドSCを含む。また、末端画像印刷指示コマンドC7は、「Thank△You」という文字列を指定して、当該文字列の印刷を指示する文字列印刷指示コマンドMCと、改行コマンドLFとを含む。
印刷制御データにおいて、末端画像印刷指示コマンドC7の次には、切断指示コマンドSSが含まれる。切断指示コマンドSSは、ロール紙の切断を指示するコマンドである。レシートの発行を指示する印刷制御データにおいて、切断指示コマンドSSが最後のコマンドとなる。
In the print control data, a detailed print instruction command C3 is provided after the issue date / time print instruction command C2. The detail print instruction command C3 exists for the purchased product.
The detail print instruction command C3 includes a character string decoration command SC for instructing left-justified decoration. The detail print instruction command C3 includes a character string print instruction command MC that designates a character string representing the name of the product, the unit price of the product, the purchase quantity, and the purchase price, and prints the character string. Command LF.
In the print control data, a total amount print instruction command C4 is provided after the detail print instruction command C3. The total amount printing instruction command C4 includes a character string decoration command SC for instructing bolding and left-justified decoration. The total amount print instruction command C4 designates a character string “Total” and a character string indicating the total amount, and includes a character string print instruction command MC for instructing printing of the character string, and a line feed command LF. Including.
In the print control data, a bar code print instruction command C5 is provided after the total amount print instruction command C4. The barcode printing instruction command C5 is a command for designating a code and printing a barcode image R5 indicating the designated code. The printing apparatus 12 includes a function of generating barcode image data based on the code designated by the barcode printing instruction command C5 and printing the barcode image R5 based on the generated image data.
In the print control data, the barcode print instruction command C5 is followed by a member number print instruction command C6. The member number print instruction command C6 includes a character string decoration command SC for instructing left-justified decoration. Also, the member number print instruction command C6 includes a character string print instruction command MC that designates a character string “membership ΔNO.” And a character string indicating the member number, and instructs the printing of the character string, and a line feed Command LF.
In the print control data, a member number print instruction command C6 is followed by a terminal image print instruction command C7. The end image print instruction command C7 includes a character string decoration command SC for instructing center-centered decoration. The terminal image print instruction command C7 includes a character string print instruction command MC that designates a character string “ThankYou” and instructs the printing of the character string, and a line feed command LF.
In the print control data, a cutting instruction command SS is included after the end image printing instruction command C7. The cutting instruction command SS is a command for instructing cutting of roll paper. In the print control data instructing to issue a receipt, the cutting instruction command SS is the last command.

次に、POS端末8が印刷装置12に印刷制御データを送信したときのPOS制御システム1の各装置の動作について説明する。
図6、図7は、POS端末8が印刷装置12印刷制御データを送信したときのPOS制御システム1の各装置の動作を示すフローチャートである。図6(A)はPOS端末8の動作を、(B)は印刷装置12の動作を、(C)は制御サーバー10の動作を、(D)は管理装置14の動作を示す。
以下の説明では、第1機能部間通信経路KT1による印刷データ通信部26と、印刷データ処理部51との非同期な双方向通信についても説明する。
図6(A)に示すように、レジカウンターRCでの決済処理に基づいて、POS端末8のPOS端末制御部45のPOSアプリケーション実行部45a、及び、プリンタードライバー実行部45bは、印刷制御データを生成する(ステップSC1)。印刷制御データは、レジカウンターRCでの決済処理に基づくレシートの発行を指示するデータである。ステップSC1で生成された印刷制御データは、バイナリーデータである。また、以下の説明では、ステップSC1で生成された印刷制御データの内容は、図5(B)で例示した印刷制御データの内容である。
次いで、POS端末制御部45は、端末通信I/F46を制御して、印刷装置12に印刷制御データを送信する(ステップSC2)。
Next, the operation of each device of the POS control system 1 when the POS terminal 8 transmits print control data to the printing device 12 will be described.
6 and 7 are flowcharts showing the operation of each device of the POS control system 1 when the POS terminal 8 transmits the printing device 12 print control data. 6A shows the operation of the POS terminal 8, FIG. 6B shows the operation of the printing device 12, FIG. 6C shows the operation of the control server 10, and FIG. 6D shows the operation of the management device 14.
In the following description, asynchronous bidirectional communication between the print data communication unit 26 and the print data processing unit 51 via the first functional unit communication path KT1 will also be described.
As shown in FIG. 6A, the POS application execution unit 45a and the printer driver execution unit 45b of the POS terminal control unit 45 of the POS terminal 8 perform print control data based on the payment process at the checkout counter RC. Generate (step SC1). The print control data is data that instructs the issuance of a receipt based on the settlement process at the checkout counter RC. The print control data generated in step SC1 is binary data. In the following description, the contents of the print control data generated in step SC1 are the contents of the print control data exemplified in FIG.
Next, the POS terminal control unit 45 controls the terminal communication I / F 46 and transmits print control data to the printing apparatus 12 (step SC2).

図6(B)に示すように、USB通信接続部34は、POS端末8から送信された印刷制御データを受信する(ステップSD1)。上述したように、本例では、POS端末8と印刷装置12とはUSBで接続される。次いで、USB通信接続部34は、受信した印刷制御データを、通信制御部25に送信する(ステップSD2)。
通信制御部25は、受信した印刷制御データを、RAM等に形成されたワークエリアに記憶する。通信制御部25は、印刷制御データを印刷制御部29に送信する(ステップSD3)。
印刷制御部29は、プリンター制御部40との間での通信を確立し、印刷制御データをプリンター制御部40に送信する(ステップSD4)。印刷制御部29とプリンター制御部40とは、USBで通信する。ステップSD4で、印刷制御部29は、USBで、印刷制御データを、プリンター制御部40に送信する。インターフェース基板20とプリンター基板21とを接続する第1コネクター22、及び、第2コネクター23は、USBの規格のコネクターである。
なお、印刷制御部29と、プリンター制御部40の通信の通信規格は、USBに限らない。SPI(Serial Peripheral Interface)に対応する通信規格等、他の通信規格であってもよい。
プリンター制御部40は、印刷制御データに基づいて印刷部41を制御して、印刷部41を動作させる制御回路である。印刷制御データを受信したプリンター制御部40は、印刷制御データに基づいて、印刷部41を制御して、図5(A)で例示したレシートを発行する(ステップSD5)。
As shown in FIG. 6B, the USB communication connection unit 34 receives the print control data transmitted from the POS terminal 8 (step SD1). As described above, in this example, the POS terminal 8 and the printing apparatus 12 are connected by USB. Next, the USB communication connection unit 34 transmits the received print control data to the communication control unit 25 (step SD2).
The communication control unit 25 stores the received print control data in a work area formed in a RAM or the like. The communication control unit 25 transmits print control data to the print control unit 29 (step SD3).
The print control unit 29 establishes communication with the printer control unit 40 and transmits print control data to the printer control unit 40 (step SD4). The print control unit 29 and the printer control unit 40 communicate via USB. In step SD4, the print control unit 29 transmits print control data to the printer control unit 40 by USB. The first connector 22 and the second connector 23 that connect the interface board 20 and the printer board 21 are USB standard connectors.
Note that the communication standard for communication between the print control unit 29 and the printer control unit 40 is not limited to USB. Other communication standards such as a communication standard corresponding to SPI (Serial Peripheral Interface) may be used.
The printer control unit 40 is a control circuit that controls the printing unit 41 based on the printing control data to operate the printing unit 41. The printer control unit 40 that has received the print control data controls the printing unit 41 based on the print control data to issue the receipt illustrated in FIG. 5A (step SD5).

ステップSD5の処理について詳述すると、プリンター制御部40は、トップロゴ印刷指示コマンドC1に基づいてトップロゴ画像R1を印刷する。トップロゴ画像R1の印刷時、プリンター制御部40は、グラフィック画像印刷指示コマンドGCに含まれるトップロゴ画像R1の画像データを図示せぬ画像バッファーに展開する。次いで、プリンター制御部40は、画像バッファーに展開した画像データに基づいて、印刷部41の印刷機構、搬送機構、その他の機構を制御して、トップロゴ画像R1を印刷する。
次いで、プリンター制御部40は、発行日時印刷指示コマンドC2に基づいて発行日時画像R2を印刷する。発行日時画像R2の印刷時、プリンター制御部40は、文字列印刷指示コマンドMCが指定する文字列をフォントデータに変換し、文字列装飾コマンドが指定する装飾を反映して、フォントデータを画像バッファーに展開する。次いで、プリンター制御部40は、画像バッファーに展開した画像データに基づいて、印刷部41の印刷機構、搬送機構、その他の機構を制御して、発行日時画像R2を印刷する。
同様にして、プリンター制御部40は、明細印刷指示コマンドC3、合計金額印刷指示コマンドC4に基づいて、購入商品関連画像R3、合計金額画像R4を印刷する。
次いで、プリンター制御部40は、バーコード印刷指示コマンドC5に基づいて、バーコード画像R5を印刷する。バーコード画像R5の印刷時、プリンター制御部40は、バーコード印刷指示コマンドC5が指定するコードに基づいて、バーコード画像R5の画像データを生成する。次いで、プリンター制御部40は、バーコード画像R5の画像データを画像バッファーに展開し、印刷部41の印刷機構、搬送機構、その他の機構を制御して、バーコード画像R5を印刷する。
次いで、プリンター制御部40は、会員番号印刷指示コマンドC6、末端画像印刷指示コマンドC7に基づいて、会員番号画像R6、末端画像R7を印刷する。
次いで、プリンター制御部40は、切断指示コマンドSSに基づいて、切断機構、搬送機構、その他の機構を制御して、ロール紙を切断する。
以上により、図5(B)で例示した印刷制御データに基づいて、図5(A)で例示したレシートが発行される。
The processing in step SD5 will be described in detail. The printer control unit 40 prints the top logo image R1 based on the top logo printing instruction command C1. When printing the top logo image R1, the printer control unit 40 develops the image data of the top logo image R1 included in the graphic image print instruction command GC in an image buffer (not shown). Next, the printer control unit 40 controls the printing mechanism, the transport mechanism, and other mechanisms of the printing unit 41 based on the image data developed in the image buffer, and prints the top logo image R1.
Next, the printer control unit 40 prints the issue date image R2 based on the issue date print instruction command C2. When printing the issue date image R2, the printer control unit 40 converts the character string specified by the character string print instruction command MC into font data, reflects the decoration specified by the character string decoration command, and stores the font data in the image buffer. Expand to. Next, the printer control unit 40 controls the printing mechanism, the transport mechanism, and other mechanisms of the printing unit 41 based on the image data developed in the image buffer, and prints the issue date image R2.
Similarly, the printer control unit 40 prints the purchased product-related image R3 and the total amount image R4 based on the detailed print instruction command C3 and the total amount print instruction command C4.
Next, the printer control unit 40 prints the barcode image R5 based on the barcode printing instruction command C5. When printing the barcode image R5, the printer control unit 40 generates image data of the barcode image R5 based on the code designated by the barcode printing instruction command C5. Next, the printer control unit 40 develops the image data of the barcode image R5 in the image buffer, and controls the printing mechanism, the transport mechanism, and other mechanisms of the printing unit 41 to print the barcode image R5.
Next, the printer control unit 40 prints the member number image R6 and the end image R7 based on the member number print instruction command C6 and the end image print instruction command C7.
Next, the printer control unit 40 controls the cutting mechanism, the transport mechanism, and other mechanisms based on the cutting instruction command SS to cut the roll paper.
As described above, the receipt illustrated in FIG. 5A is issued based on the print control data illustrated in FIG.

印刷制御データに基づくレシートの発行が完了すると、プリンター制御部40は、処理結果を示す処理結果通知データを生成し、印刷制御部29に送信する(ステップSD6)。処理結果通知データは、レシートの発行が正常に終了した場合はその旨を示し、レシートの発行が失敗した場合はその旨、及び、原因を示すデータである。本例では、ステップSD5でレシートの発行が正常に終了し、ステップSD6で、プリンター制御部40は、正常終了を示す処理結果通知データを送信する。
印刷制御部29は、受信した処理結果通知データを、通信制御部25に送信する(ステップSD7)。
通信制御部25は、受信した処理結果通知データの内容が、レシートの発行が正常に終了したことを示すものであるか否かを判別する(ステップSD8)。
処理結果通知データの内容が、レシートの発行が正常に終了したことを示すものではない場合(ステップSD8:NO)、通信制御部25は、対応する処理を実行する(ステップSD9)。例えば、通信制御部25は、POS端末8に、処理結果通知データを送信する。POS端末8は、処理結果通知データに基づいて、レシートの発行が失敗したことのユーザーへの報知等を実行する。また例えば、通信制御部25は、印刷装置12に配設されたLED等の報知手段を制御して、レシートの発行が失敗したことをユーザーに報知する。
一方、ステップSD8において、処理結果通知データの内容が、レシートの発行が正常に終了したことを示すものである場合(ステップSD8:YES)、通信制御部25は、ワークエリアに記憶した印刷制御データを、印刷データ通信部26に送信する(ステップSD10)。
ステップSD10の処理を詳述する。
上述したように、通信制御部25は、受信した印刷制御データを、ワークエリアに記憶する。ワークエリアは、受信バッファーとして機能する。ワークエリアへの記憶に際して、通信制御部25は、ワークエリアに印刷制御データに含まれる各コマンドを順番に格納していく。印刷制御データに含まれる各コマンドのワークエリアへの記憶中、通信制御部25は、ワークエリアに記憶したコマンドが、切断指示コマンドSSであるか否かを監視する。切断指示コマンドSSである場合、図示しないRTC(real time clock)の出力に基づいて、通信制御部25は、現在の日時(日付+時刻)を示すデータ(以下、「発行日時データ」という。)を取得する。現在の発行日時データの取得方法は、上記方法に限らず、どのような方法であってもよい。発行日時データが示す日時は、レシートを発行した日時に対応する。
ステップSD10で、通信制御部25は、印刷制御データの先頭に、時刻データを付加して、印刷データ通信部26に送信する。時刻データの利用方法については、後述する。
When the issuance of the receipt based on the print control data is completed, the printer control unit 40 generates processing result notification data indicating the processing result and transmits it to the print control unit 29 (step SD6). The processing result notification data is data indicating the fact when the receipt issuance is completed normally, and indicating the cause and the cause when the receipt is unsuccessful. In this example, the receipt issuance ends normally in step SD5, and in step SD6, the printer control unit 40 transmits processing result notification data indicating normal end.
The print control unit 29 transmits the received processing result notification data to the communication control unit 25 (step SD7).
The communication control unit 25 determines whether or not the content of the received processing result notification data indicates that the receipt has been issued normally (step SD8).
When the content of the processing result notification data does not indicate that the receipt issuance has been completed normally (step SD8: NO), the communication control unit 25 executes the corresponding processing (step SD9). For example, the communication control unit 25 transmits processing result notification data to the POS terminal 8. The POS terminal 8 performs notification to the user that receipt issuance has failed based on the processing result notification data. In addition, for example, the communication control unit 25 controls a notification unit such as an LED provided in the printing apparatus 12 to notify the user that the receipt issuance has failed.
On the other hand, in step SD8, when the content of the processing result notification data indicates that the receipt has been issued normally (step SD8: YES), the communication control unit 25 prints the print control data stored in the work area. Is transmitted to the print data communication unit 26 (step SD10).
The process of step SD10 will be described in detail.
As described above, the communication control unit 25 stores the received print control data in the work area. The work area functions as a reception buffer. When storing in the work area, the communication control unit 25 sequentially stores each command included in the print control data in the work area. While storing each command included in the print control data in the work area, the communication control unit 25 monitors whether or not the command stored in the work area is the cutting instruction command SS. In the case of the disconnection instruction command SS, based on the output of an RTC (real time clock) (not shown), the communication control unit 25 indicates data indicating the current date (date + time) (hereinafter referred to as “issue date / time data”). To get. The method of acquiring the current issue date / time data is not limited to the above method, and any method may be used. The date and time indicated by the issue date and time data corresponds to the date and time when the receipt is issued.
In step SD10, the communication control unit 25 adds the time data to the head of the print control data and transmits it to the print data communication unit 26. A method of using time data will be described later.

このように、本実施形態では、通信制御部25は、印刷部41によるレシートの発行が正常に終了した場合に、印刷制御データを印刷データ通信部26に送信する。このため、以下の効果を奏する。すなわち、後に明らかとなるとおり、印刷データ通信部26に送信された印刷制御データは、制御サーバー10に送信される。制御サーバー10は、印刷制御データ、及び、印刷制御データに基づくデータを記憶する。そして、レシートの発行が正常に終了した場合に、通信制御部25から印刷データ通信部26に対して印刷制御データが送信される構成のため、実際に発行されたレシートに対応する印刷制御データが、制御サーバー10に送信され、制御サーバー10で記憶される。処理が失敗し、発行されなかったレシートに対応する印刷制御データは、制御サーバー10に送信されず、制御サーバー10で記憶されない。従って、制御サーバー10は、発行されたレシートに対応する印刷制御データ、及び、印刷制御データに基づくデータを記憶することができる。   As described above, in the present embodiment, the communication control unit 25 transmits the print control data to the print data communication unit 26 when the issuance of the receipt by the printing unit 41 is normally completed. For this reason, there exist the following effects. That is, as will become clear later, the print control data transmitted to the print data communication unit 26 is transmitted to the control server 10. The control server 10 stores print control data and data based on the print control data. Since the print control data is transmitted from the communication control unit 25 to the print data communication unit 26 when the receipt issuance is normally completed, the print control data corresponding to the actually issued receipt is stored. Are transmitted to the control server 10 and stored in the control server 10. Print control data corresponding to a receipt that has not been issued due to processing failure is not transmitted to the control server 10 and is not stored in the control server 10. Accordingly, the control server 10 can store print control data corresponding to the issued receipt and data based on the print control data.

印刷データ通信部26は、受信した印刷制御データを、第1通信部30に送信する(ステップSD11)。
以下、ステップSD11の処理について詳述する。
図5(B)を用いて説明したとおり、印刷制御データは、画像の印刷を指示する複数のコマンドを備え、最後のコマンドとして、切断指示コマンドSSを備える。
そして、印刷データ通信部26は、通信制御部25から、印刷制御データに含まれるコマンドを、受信し、切断指示コマンドSSを受信した場合に、1つのレシートに対応する印刷制御データの受信が完了したと判断する。そして、ステップSD11において、印刷データ通信部26は、1つ前の切断指示コマンドSSを受信してから、新たに切断指示コマンドSSを受信するまでに受信したコマンド(新たに受信した切断指示コマンドSSを含む。)を、1つのレシートに対応する印刷制御データとして、第1通信部30に送信する。
このような構成のため、通信制御部25から印刷データ通信部26に対して、複数のレシートに対応する印刷制御データが送信された場合であっても、印刷データ通信部26は、1のレシートに対応する印刷制御データを、異なるレシートに対応する印刷制御データとして、第1通信部30に送信できる。
第1通信部30は、受信した印刷制御データを、第1WebSocketコネクションCT1により、制御サーバー10に送信する(ステップSD12)。ステップSD12で第1通信部30が送信した印刷制御データの先頭には、発行日時データが付加されている。
The print data communication unit 26 transmits the received print control data to the first communication unit 30 (step SD11).
Hereinafter, the process of step SD11 will be described in detail.
As described with reference to FIG. 5B, the print control data includes a plurality of commands for instructing image printing, and includes a cutting instruction command SS as the last command.
Then, when the print data communication unit 26 receives a command included in the print control data from the communication control unit 25 and receives a cutting instruction command SS, reception of the print control data corresponding to one receipt is completed. Judge that In step SD11, the print data communication unit 26 receives a command (newly received cutting instruction command SS received from when the previous cutting instruction command SS is received until when a new cutting instruction command SS is received). Is transmitted to the first communication unit 30 as print control data corresponding to one receipt.
Due to such a configuration, even when print control data corresponding to a plurality of receipts is transmitted from the communication control unit 25 to the print data communication unit 26, the print data communication unit 26 has one receipt. Can be transmitted to the first communication unit 30 as print control data corresponding to different receipts.
The first communication unit 30 transmits the received print control data to the control server 10 through the first WebSocket connection CT1 (step SD12). Issue date data is added to the head of the print control data transmitted by the first communication unit 30 in step SD12.

図6(C)に示すように、制御サーバー10の第1接続部54は、第1WebSocketコネクションCT1により、印刷制御データを受信する(ステップSE1)。次いで、第1接続部54は、受信した印刷制御データを、印刷データ処理部51に送信する(ステップSE2)。
印刷データ処理部51は、受信した印刷制御データを、RAM等に形成されたワークエリアに記憶する。次いで、印刷データ処理部51は、受信した印刷制御データに基づいて、印刷制御データに基づいて発行されるレシートに印刷される文字列を抽出し、抽出した文字列を含むテキストファイルである抽出文字列データを生成する(ステップSE3)。
As shown in FIG. 6C, the first connection unit 54 of the control server 10 receives the print control data through the first WebSocket connection CT1 (step SE1). Next, the first connection unit 54 transmits the received print control data to the print data processing unit 51 (step SE2).
The print data processing unit 51 stores the received print control data in a work area formed in a RAM or the like. Next, the print data processing unit 51 extracts a character string to be printed on a receipt issued based on the print control data based on the received print control data, and an extracted character that is a text file including the extracted character string Column data is generated (step SE3).

以下、ステップSE3の処理について、図5(B)に例示する印刷制御データを用いて詳述する。
まず、印刷データ処理部51は、テキストファイルである抽出文字列データを生成する。
次いで、印刷データ処理部51は、トップロゴ印刷指示コマンドC1を処理対象とする。印刷データ処理部51は、トップロゴ印刷指示コマンドC1のグラフィック画像印刷指示コマンドを読み出し、当該コマンドは、文字列の印刷を指示するコマンドでないと判断する。当該判断は、例えば、命令コードを識別することによって行われる。印刷データ処理部51は、トップロゴ印刷指示コマンドC1からの文字列の抽出を行わない。
次いで、印刷データ処理部51は、発行日時印刷指示コマンドC2を処理対象とする。印刷データ処理部51は、発行日時印刷指示コマンドC2の文字列印刷指示コマンドMCを読み出し、当該コマンドは、文字列の印刷を指示するコマンドであると判断する。当該判断は、例えば、命令コードを識別することによって行われる。印刷データ処理部51は、文字列印刷指示コマンドMCのデータ部を参照し、データ部が指定する文字列をテキスト化する。次いで、印刷データ処理部51は、テキスト化した文字列(本例では、文字列「2013/1/1/12:00」。)を抽出文字列データに記述し、改行する。
以上のようにして、印刷データ処理部51は、印刷制御データに含まれるコマンドを順番に処理対象とし、処理対象のコマンドが文字列の印刷を指示するコマンドである場合は、文字列を抽出してテキスト化し、テキスト化した文字列を抽出文字列データにし、改行する。
図8は、図5(B)の印刷制御データに基づいて生成される抽出文字列データの内容を示す図である。
図8に示すように、抽出文字列データには、レシート(図5(A)参照。)に印刷される文字列が、テキストとして、含まれる。
Hereinafter, the process of step SE3 will be described in detail using the print control data illustrated in FIG.
First, the print data processing unit 51 generates extracted character string data that is a text file.
Next, the print data processing unit 51 sets the top logo print instruction command C1 as a processing target. The print data processing unit 51 reads the graphic image print instruction command of the top logo print instruction command C1, and determines that the command is not a command for instructing printing of a character string. This determination is made, for example, by identifying an instruction code. The print data processing unit 51 does not extract a character string from the top logo print instruction command C1.
Next, the print data processing unit 51 sets the issue date / time print instruction command C2 as a processing target. The print data processing unit 51 reads the character string print instruction command MC of the issue date / time print instruction command C2, and determines that the command is a command for instructing printing of the character string. This determination is made, for example, by identifying an instruction code. The print data processing unit 51 refers to the data part of the character string print instruction command MC and converts the character string designated by the data part into text. Next, the print data processing unit 51 describes the character string converted into text (in this example, the character string “2013/1/1/12: 00”) in the extracted character string data, and starts a new line.
As described above, the print data processing unit 51 sequentially processes the commands included in the print control data, and extracts the character string when the command to be processed is a command instructing printing of the character string. The text is converted into text, and the converted text is converted into extracted character string data, followed by a line break.
FIG. 8 is a diagram showing the contents of extracted character string data generated based on the print control data in FIG.
As shown in FIG. 8, the extracted character string data includes a character string printed on a receipt (see FIG. 5A) as text.

次いで、印刷データ処理部51は、制御サーバー記憶部57が記憶する印刷制御データDB57bにアクセスする(ステップSE4)。
図9(A)は、印刷制御データDB57bの1件のレコードのデータ構造を示す図である。
図9(A)に示すように、印刷制御データDB57bの1件のレコードは、印刷装置識別情報と、レコード作成日時と、抽出文字列データと、印刷制御データと、発行日時データと、を対応付けて記憶する。なお、レコード作成日時とは、レコードを作成した日時を示す情報である。
次いで、印刷データ処理部51は、印刷制御データDB57bに1件のレコードを作成する。印刷データ処理部51は、当該レコードで、印刷制御データの送信元の印刷装置12の印刷装置識別情報と、当該レコードを作成したときの日時を示すレコード作成日時と、受信した印刷制御データに基づいて生成した抽出文字列データと、受信した印刷制御データと、受信した印刷制御データに付加された発行日時データと、を対応付けて記憶する(ステップSE5)。
ステップSE5において、印刷データ処理部51は、印刷装置識別情報を以下のようにして取得する。すなわち、まず、印刷データ処理部51は、印刷制御データの受信に用いたWebSocketコネクションCT(本例では、第1WebSocketコネクションCT1)のコネクション識別情報を取得する。次いで、印刷データ処理部51は、制御サーバー記憶部57が記憶するコネクション管理データベース57aを参照する。上述したように、コネクション管理データベース57aでは、確立しているWebSocketコネクションCTについて、コネクション識別情報と、印刷装置識別情報とを対応付けて記憶する。次いで、印刷データ処理部51は、取得したコネクション識別情報をキーとして、コネクション管理データベース57aで当該識別情報と対応付けられた印刷装置識別情報を取得する。
なお、上述したように、抽出文字列データはレシートに印刷される文字列が含まれるテキストファイルであり、印刷制御データはバイナリーデータである。
また、レコードに含まれる印刷装置識別情報や、レコード作成日時は、印刷制御データDB57bの所望のレコードを検索するときの検索キーとして利用可能である。
Next, the print data processing unit 51 accesses the print control data DB 57b stored in the control server storage unit 57 (step SE4).
FIG. 9A shows the data structure of one record in the print control data DB 57b.
As shown in FIG. 9A, one record in the print control data DB 57b corresponds to printing apparatus identification information, record creation date / time, extracted character string data, print control data, and issue date / time data. Add and remember. Note that the record creation date and time is information indicating the date and time when the record was created.
Next, the print data processing unit 51 creates one record in the print control data DB 57b. The print data processing unit 51 is based on the printing device identification information of the printing device 12 that is the transmission source of the print control data, the record creation date and time indicating the date and time when the record was created, and the received print control data. The extracted character string data generated in this manner, the received print control data, and the issue date data added to the received print control data are stored in association with each other (step SE5).
In step SE5, the print data processing unit 51 acquires the printing apparatus identification information as follows. That is, first, the print data processing unit 51 acquires the connection identification information of the WebSocket connection CT (in this example, the first WebSocket connection CT1) used for receiving the print control data. Next, the print data processing unit 51 refers to the connection management database 57 a stored in the control server storage unit 57. As described above, the connection management database 57a stores connection identification information and printing apparatus identification information in association with each other for the established WebSocket connection CT. Next, the print data processing unit 51 acquires the printing apparatus identification information associated with the identification information in the connection management database 57a using the acquired connection identification information as a key.
As described above, the extracted character string data is a text file including a character string to be printed on a receipt, and the print control data is binary data.
Further, the printing apparatus identification information included in the record and the record creation date and time can be used as a search key when searching for a desired record in the print control data DB 57b.

このように、本実施形態に係る制御サーバー10は、印刷装置12から印刷制御データを受信した場合、印刷制御データと、印刷制御データに基づく抽出文字列データとを対応付けて記憶する。このため、以下の効果を奏する。
すなわち、後述するように、抽出文字列データは、管理装置14に送信され、管理装置14は、抽出文字列データに基づいて、各種処理を実行する。ここで、レシートに印刷される情報には、文字列以外でも、後に利用可能な情報がある。例えば、トップロゴ印刷指示コマンドC1は、レシートに印刷されたトップロゴを知る際に用いることができる。また、バーコード印刷指示コマンドC5は、レシートの識別情報を知る際に用いることができる。従って、印刷制御データを記憶することにより、文字列以外の情報を後に用いることが可能となる。
また、印刷制御データを記憶することにより、印刷制御データを用いて、レシートを再発行できる。
As described above, when receiving the print control data from the printing apparatus 12, the control server 10 according to the present embodiment stores the print control data and the extracted character string data based on the print control data in association with each other. For this reason, there exist the following effects.
That is, as will be described later, the extracted character string data is transmitted to the management device 14, and the management device 14 executes various processes based on the extracted character string data. Here, the information printed on the receipt includes information other than the character string that can be used later. For example, the top logo print instruction command C1 can be used to know the top logo printed on the receipt. Further, the barcode printing instruction command C5 can be used when knowing receipt identification information. Therefore, by storing the print control data, information other than the character string can be used later.
Further, by storing the print control data, the receipt can be reissued using the print control data.

次いで、印刷データ処理部51は、抽出文字列データ、印刷制御データの送信元の印刷装置12の印刷装置識別情報を示すデータ、及び、店舗情報(後述)を示すデータを、通信管理部50に送信する(ステップSE6)。
以下、ステップSE6の処理について詳述する。
制御サーバー記憶部57は、店舗情報管理DB57eを記憶する。
店舗情報管理DB57eは、印刷装置識別情報と、対応付けて店舗情報を記憶するデータベースである。店舗情報は、対応する印刷装置12が設定されている店舗の名称、店舗の識別情報を含む情報である。店舗情報に、店舗の住所や、電話番号等の他の情報を含んでいてもよい。
ステップSE6で、印刷データ処理部51は、店舗情報管理DB57eを参照する。次いで、印刷データ処理部51は、印刷装置識別情報をキーとして、店舗情報管理DB57ed、当該識別情報と対応付けられた店舗情報を取得する。次いで、印刷データ処理部51は、抽出文字列データ、及び、印刷装置識別情報を示すデータと共に、店舗情報を示すデータを通信管理部50に送信する。
通信管理部50は、制御サーバー記憶部57が記憶する管理装置管理DB57cを参照する(ステップSE7)。
管理装置管理DB57cは、制御サーバー10に接続された印刷装置12について、印刷装置12の印刷装置識別情報と、印刷装置12に対応する管理装置14のアドレスとを対応付けて記憶するデータベースである。1の印刷装置12と、1の管理装置14とが対応するとは、当該1の印刷装置12が、当該1の管理装置14が管理する店舗システム11に設けられ、当該1の印刷装置12が、当該1の管理装置14の制御対象であることを示す。
次いで、通信管理部50は、印刷データ処理部51から受信したデータが示す印刷装置識別情報をキーとして、管理装置管理DB57cで当該識別情報と対応付けられた管理装置14のアドレスを取得する(ステップSE8)。
次いで、通信管理部50は、制御サーバー通信I/F58を制御して、ステップSE8で取得したアドレスの管理装置14に、抽出文字列データ、及び、店舗情報を示すデータを送信する(ステップSE9)。
Next, the print data processing unit 51 sends the extracted character string data, the data indicating the printing device identification information of the printing device 12 that is the transmission source of the print control data, and the data indicating the store information (described later) to the communication management unit 50. Transmit (step SE6).
Hereinafter, the process of step SE6 will be described in detail.
The control server storage unit 57 stores a store information management DB 57e.
The store information management DB 57e is a database that stores the store information in association with the printing apparatus identification information. The store information is information including the name of the store in which the corresponding printing device 12 is set, and store identification information. The store information may include other information such as a store address and a telephone number.
In step SE6, the print data processing unit 51 refers to the store information management DB 57e. Next, the print data processing unit 51 uses the printing apparatus identification information as a key to acquire the store information management DB 57ed and store information associated with the identification information. Next, the print data processing unit 51 transmits the data indicating the store information to the communication management unit 50 together with the extracted character string data and the data indicating the printing apparatus identification information.
The communication management unit 50 refers to the management device management DB 57c stored in the control server storage unit 57 (step SE7).
The management device management DB 57c is a database that stores, for the printing device 12 connected to the control server 10, the printing device identification information of the printing device 12 and the address of the management device 14 corresponding to the printing device 12 in association with each other. That one printing device 12 corresponds to one management device 14 is that the one printing device 12 is provided in the store system 11 managed by the one management device 14, and the one printing device 12 is It shows that it is a control target of the one management apparatus 14.
Next, using the printing device identification information indicated by the data received from the print data processing unit 51 as a key, the communication management unit 50 obtains the address of the management device 14 associated with the identification information in the management device management DB 57c (step). SE8).
Next, the communication management unit 50 controls the control server communication I / F 58 to transmit the extracted character string data and the data indicating the store information to the management device 14 having the address acquired in Step SE8 (Step SE9). .

図6(D)に示すように、管理装置制御部70は、管理装置通信I/F71を制御して、抽出文字列データ、及び、店舗情報を示すデータを受信する(ステップSF1)。
次いで、管理装置制御部70は、管理装置記憶部72が記憶する条件データベース72aを参照し、抽出文字列分析処理を実行する(ステップSF2)。
以下、抽出文字列分析処理について詳述する。
抽出文字列分析処理は、管理装置制御部70が、抽出文字列データに含まれる文字列を分析してクーポンを発行するか否かを判別し、クーポンを発行する場合は、発行するクーポンの内容を示すクーポン内容情報を取得する処理である。
条件データベース72aは、クーポンを発行する条件と、条件が成立した場合に発行するクーポンの内容を示す情報であるクーポン内容情報と、を対応付けて記憶するデータベースである。条件は、複数存在してもよい。
例えば、クーポンを発行する条件は、会計を行った顧客の会員番号が、特定の番号であること、である。この場合、管理装置制御部70は、以下の処理を実行する。すなわち、管理装置制御部70は、抽出文字列データについて、文字列「membership△NO.」をキーとして文字列検索を行い、当該文字列と同一行に記述された文字列を、顧客の会員番号として取得する。次いで、管理装置制御部70は、取得した顧客の会員番号が、特定の番号であるか否かを判別する。管理装置制御部70は、取得した顧客の会員番号が、特定の番号である場合、条件が成立したとして、クーポンを発行すると判別する。次いで、管理装置制御部70は、条件データベース72aを参照し、成立した条件と対応付けられたクーポン内容情報を取得する。
また、クーポンを発行する条件は、所定の商品名の商品が購入されていること、である。この場合、管理装置制御部70は、以下の処理を実行する。すなわち、管理装置制御部70は、抽出文字列データについて、所定の商品名をキーとして文字列検索を行う。次いで、管理装置制御部70は、検索が成立した場合、条件が成立したとして、クーポンを発行すると判別する。次いで、管理装置制御部70は、条件データベース72aを参照し、成立した条件と対応付けられたクーポン内容情報を取得する。
また例えば、クーポンを発行する条件は、購入商品の合計金額が、所定の金額を上回ったこと、である。この場合、管理装置制御部70は、以下の処理を実行する。すなわち、管理装置制御部70は、抽出文字列データについて、文字列「Total」をキーとして文字列検索を行い、当該文字列と同一行に含まれる文字列が示す値を、購入商品の合計金額として取得する。次いで、管理装置制御部70は、取得した購入商品の合計金額が、所定の金額を上回ったか否かを判別する。管理装置制御部70は、取得した購入商品の合計金額が、所定の金額を上回った場合、条件が成立したとして、クーポンを発行すると判別する。次いで、管理装置制御部70は、条件データベース72aを参照し、成立した条件と対応付けられたクーポン内容情報を取得する。
条件は、時間帯や、会員によって動的に変更する構成であってもよい。すなわち、条件とは、抽出文字列データに含まれる情報、及び、他の情報に基づいて、その成否が決定するものであれば、どのようなものであってもよい。
例えば、ステップSF1で、管理装置制御部70は、抽出文字列データと共に、店舗情報を示すデータを受信する。そして、条件に、店舗情報を利用してもよい。例えば、条件に、特定の店舗であること、を含めもよい。これにより、店舗によって、クーポンの内容を変更することができる。また、これにより、クーポンに、店舗の名称を印刷することができる。
本例では、ステップSF2の抽出文字列分析処理で、管理装置制御部70は、所定の条件が成立したため、クーポンを発行すると判別し、対応するクーポン内容情報を取得する。
As shown in FIG. 6D, the management device control unit 70 controls the management device communication I / F 71 to receive extracted character string data and data indicating store information (step SF1).
Next, the management device control unit 70 refers to the condition database 72a stored in the management device storage unit 72, and executes the extracted character string analysis process (step SF2).
Hereinafter, the extracted character string analysis process will be described in detail.
In the extracted character string analysis process, the management device control unit 70 analyzes the character string included in the extracted character string data to determine whether or not to issue a coupon. It is the process which acquires the coupon content information which shows.
The condition database 72a is a database that stores a condition for issuing a coupon in association with coupon content information that is information indicating the content of a coupon issued when the condition is satisfied. There may be a plurality of conditions.
For example, the condition for issuing the coupon is that the membership number of the customer who made the transaction is a specific number. In this case, the management device control unit 70 executes the following processing. That is, the management device control unit 70 performs a character string search for the extracted character string data using the character string “membershipΔNO.” As a key, and uses the character string described in the same line as the character string as the customer member number. Get as. Next, the management apparatus control unit 70 determines whether or not the acquired customer membership number is a specific number. When the acquired customer membership number is a specific number, the management device control unit 70 determines that the condition is satisfied and issues a coupon. Next, the management device control unit 70 refers to the condition database 72a and acquires coupon content information associated with the established condition.
The condition for issuing a coupon is that a product with a predetermined product name is purchased. In this case, the management device control unit 70 executes the following processing. That is, the management device control unit 70 performs a character string search for the extracted character string data using a predetermined product name as a key. Next, when the search is established, the management device control unit 70 determines that the condition is established and issues a coupon. Next, the management device control unit 70 refers to the condition database 72a and acquires coupon content information associated with the established condition.
Further, for example, the condition for issuing the coupon is that the total amount of purchased products exceeds a predetermined amount. In this case, the management device control unit 70 executes the following processing. That is, the management device control unit 70 performs a character string search for the extracted character string data using the character string “Total” as a key, and the value indicated by the character string included in the same line as the character string is the total amount of the purchased product. Get as. Next, the management apparatus control unit 70 determines whether or not the acquired total amount of purchased products exceeds a predetermined amount. The management apparatus control unit 70 determines that the coupon is issued, assuming that the condition is satisfied, when the total amount of the acquired purchased products exceeds a predetermined amount. Next, the management device control unit 70 refers to the condition database 72a and acquires coupon content information associated with the established condition.
The conditions may be configured to change dynamically according to the time zone or members. That is, the condition may be any condition as long as the success or failure is determined based on information included in the extracted character string data and other information.
For example, in step SF1, the management apparatus control unit 70 receives data indicating store information together with the extracted character string data. And store information may be used for conditions. For example, the condition may include a specific store. Thereby, the contents of the coupon can be changed depending on the store. Thereby, the name of the store can be printed on the coupon.
In this example, in the extracted character string analysis process of step SF2, the management device control unit 70 determines that a coupon is issued because a predetermined condition is satisfied, and acquires corresponding coupon content information.

ステップSF2の抽出文字列分析処理の実行後、管理装置制御部70は、クーポン発行制御データ(第2の印刷制御データ)を生成する(ステップSF3)。
クーポン発行制御データは、クーポンの発行に際し、印刷装置12に印刷させる情報が含まれるXML(Extensible Markup Language)ファイルである。クーポン発行制御データには、XMLフォーマットに従って、印刷装置12に印刷させる情報、例えば、画像データや、画像の位置を示す情報等が含まれる。また、クーポン発行制御データは、印刷させる印刷装置12の印刷装置識別情報がタグとして含む。
管理装置制御部70は、ステップSF2の抽出文字列分析処理により取得したクーポン内容情報に基づいて、当該情報が示す内容のクーポンを発行させるクーポン発行制御データを生成する機能を有する。
図7(D)に示すように、管理装置制御部70は、管理装置通信I/F71を制御して、生成したクーポン発行制御データを、制御サーバー10に送信する(ステップSF4)。
After executing the extracted character string analysis process in step SF2, the management device control unit 70 generates coupon issue control data (second print control data) (step SF3).
The coupon issue control data is an XML (Extensible Markup Language) file that includes information to be printed by the printing apparatus 12 when a coupon is issued. The coupon issue control data includes information to be printed by the printing device 12 according to the XML format, for example, image data, information indicating the position of the image, and the like. Further, the coupon issue control data includes printing device identification information of the printing device 12 to be printed as a tag.
The management device control unit 70 has a function of generating coupon issue control data for issuing a coupon having the content indicated by the information, based on the coupon content information acquired by the extracted character string analysis process in step SF2.
As shown in FIG. 7D, the management device control unit 70 controls the management device communication I / F 71 to transmit the generated coupon issue control data to the control server 10 (step SF4).

図7(C)に示すように、制御サーバー10の通信管理部50は、制御サーバー通信I/F58を制御して、クーポン発行制御データを受信する(ステップSE10)。次いで、通信管理部50は、受信したクーポン発行制御データを、印刷データ処理部51に送信する(ステップSE11)。
印刷データ処理部51は、受信したクーポン発行制御データを、第1接続部54に送信する(ステップSE12)。
第1接続部54は、受信したクーポン発行制御データを、第1WebSocketコネクションCT1により、印刷装置12に送信する(ステップSE13)。
As shown in FIG. 7C, the communication management unit 50 of the control server 10 controls the control server communication I / F 58 to receive coupon issue control data (step SE10). Next, the communication management unit 50 transmits the received coupon issue control data to the print data processing unit 51 (step SE11).
The print data processing unit 51 transmits the received coupon issue control data to the first connection unit 54 (step SE12).
The first connection unit 54 transmits the received coupon issue control data to the printing apparatus 12 through the first WebSocket connection CT1 (step SE13).

図7(B)に示すように、印刷装置12の第1通信部30は、第1WebSocketコネクションCT1により、クーポン発行制御データを受信する(ステップSD13)。次いで、第1通信部30は、受信したクーポン発行制御データを、印刷データ通信部26に送信する(ステップSD14)。
印刷データ通信部26は、受信したクーポン発行制御データを、印刷部18のコマンド体系のコマンドであるクーポン発行制御コマンドに変換する(ステップSD15)。印刷データ通信部26は、XMLファイルであるクーポン発行制御データを、印刷部41の制御回路であるプリンター制御部40が解釈可能なコマンドに変換する。
次いで、印刷制御部17は、クーポン発行制御コマンドを、印刷制御部29に送信する(ステップSD16)。
印刷制御部29は、プリンター制御部40との間での通信を確立し、クーポン発行制御コマンドをプリンター制御部40に送信する(ステップSD17)。
プリンター制御部40は、受信したクーポン発行制御コマンドに基づいて、印刷部41を制御して、クーポンを発行する(ステップSD18)。
As shown in FIG. 7B, the first communication unit 30 of the printing apparatus 12 receives the coupon issue control data through the first WebSocket connection CT1 (step SD13). Next, the first communication unit 30 transmits the received coupon issue control data to the print data communication unit 26 (step SD14).
The print data communication unit 26 converts the received coupon issuance control data into a coupon issuance control command that is a command command of the printing unit 18 (step SD15). The print data communication unit 26 converts the coupon issue control data that is an XML file into a command that can be interpreted by the printer control unit 40 that is a control circuit of the printing unit 41.
Next, the print control unit 17 transmits a coupon issue control command to the print control unit 29 (step SD16).
The print control unit 29 establishes communication with the printer control unit 40, and transmits a coupon issue control command to the printer control unit 40 (step SD17).
Based on the received coupon issue control command, the printer control unit 40 controls the printing unit 41 to issue a coupon (step SD18).

クーポンの発行後は、印刷装置12、制御サーバー10、及び、管理装置14は、以下の処理を行う。
印刷装置12のプリンター制御部40は、クーポンの発行処理の結果を示すクーポン発行結果通知データを生成する。クーポン発行結果通知データは、クーポンの発行が正常に完了したか否かを示す情報、及び、失敗した場合はその原因を示す情報を含むデータである。
プリンター制御部40は、生成したクーポン発行結果通知データを印刷制御部29に送信する。印刷制御部29は、受信したクーポン発行結果通知データを、印刷データ通信部26に送信する。印刷データ通信部26は、受信したクーポン発行結果通知データを、第1WebSocketコネクションCT1で、制御サーバー10の印刷データ処理部51に送信する。印刷データ処理部51は、受信したクーポン発行結果通知データを、通信管理部50に送信する。通信管理部50は、制御サーバー通信インターフェース58を制御して、受信したクーポン発行結果通知データを、管理装置14の管理装置制御部70に送信する。管理装置制御部70は、クーポン発行結果通知データに基づいて、管理装置14が備える表示パネルに、クーポンの発行処理の結果を表示する。
以上の処理が行われるため、管理装置14の管理者は、表示パネルを参照することにより、クーポンの発行が正常に行われたか否かを認識でき、失敗した場合は、その原因九名等の処理を行える。
After the coupon is issued, the printing device 12, the control server 10, and the management device 14 perform the following processing.
The printer control unit 40 of the printing apparatus 12 generates coupon issue result notification data indicating the result of the coupon issue process. The coupon issue result notification data is data including information indicating whether or not the coupon issuance has been normally completed, and information indicating the cause when the coupon is not successfully issued.
The printer control unit 40 transmits the generated coupon issue result notification data to the print control unit 29. The print control unit 29 transmits the received coupon issue result notification data to the print data communication unit 26. The print data communication unit 26 transmits the received coupon issue result notification data to the print data processing unit 51 of the control server 10 through the first WebSocket connection CT1. The print data processing unit 51 transmits the received coupon issue result notification data to the communication management unit 50. The communication management unit 50 controls the control server communication interface 58 to transmit the received coupon issue result notification data to the management device control unit 70 of the management device 14. Based on the coupon issue result notification data, the management device control unit 70 displays the result of the coupon issue processing on the display panel included in the management device 14.
Since the above processing is performed, the administrator of the management device 14 can recognize whether or not the coupon has been issued normally by referring to the display panel. Can process.

このように、印刷装置12は、インターフェース基板20に実装された拡張機能、すなわち、通信制御部25及び印刷データ通信部26の機能により、POS端末8から送信された印刷制御データを制御サーバー10に送信できる。その際、印刷装置12は、第1WebSocketコネクションCT1を用いて印刷制御データを送信するため、POS端末8から印刷制御データを受信した場合、新たにコネクションを確立する等の処理をすることなく、印刷制御データを送信できる。
また、本実施形態では、制御サーバー10は、印刷装置12から受信した印刷制御データ、及び、印刷制御データに基づく抽出文字列データを記憶する。これらデータは、店舗ごとの、また、印刷装置12の商品の販売の状況、売り上げの状況、顧客の来店の状況等の分析に利用可能な有益なデータである。つまり、本実施形態に係る制御サーバー10は、POS端末8から印刷装置12に対して送信される印刷制御データを用いて、情報を記憶する。
また、本実施形態では、制御サーバー10から、管理装置14に対して、抽出文字列データが送信される。管理装置14は、抽出文字列データに基づいて、顧客に対してクーポンを発行するか否かを判別する。このため、管理装置14は、顧客、顧客が購入した商品顧客の会計の内容等に応じて、クーポンを発行するか否かを判別できる。また、管理装置14は、クーポンを発行する場合は、成立した条件に対応する内容のクーポンを発行する。このため、管理装置14は、顧客、顧客が購入した商品、顧客の会計の内容等に応じた内容のクーポンを発行できる。管理装置14は、POS端末8から印刷装置12に対して送信される印刷制御データを用いて、対応するクーポンの発行等、各種処理を実行できる。また、管理装置14から制御サーバー10に対してクーポンの発行の指示(クーポン発行制御データの送信)があった場合、制御サーバー10は、第1WebSocketコネクションCT1を用いてクーポン発行制御データを送信する。このため、制御サーバー10は、新たにコネクションを確立する等の処理をすることなく、印刷装置12にクーポン発行制御データを送信できる。従って、印刷装置12によってレシートが発行された後、同じ印刷装置12によってレシートに対応するクーポンを発行できる。 また、本実施形態では、POS端末8から印刷装置12に対して送信する印刷制御データの内容を変更することなく、制御サーバー10、及び、管理装置14は、上述した各種処理を実行できる。つまり、本実施形態によれば、POS端末8に対する改変(POSアプリケーションのプログラム修正等)を行うことなく、制御サーバー10、管理装置14は、上述した各種処理を実行できる。従って、POS端末8と、印刷装置12とで構成された既存のシステムに対して変更をほとんど加えることなく、POS制御システム1を構築でき、POS制御システム1の構築を簡易にできる。
As described above, the printing apparatus 12 uses the extended functions mounted on the interface board 20, that is, the functions of the communication control unit 25 and the print data communication unit 26, to send the print control data transmitted from the POS terminal 8 to the control server 10. Can be sent. At that time, since the printing apparatus 12 transmits the print control data using the first WebSocket connection CT1, when the print control data is received from the POS terminal 8, the printing apparatus 12 performs printing without performing a process such as newly establishing a connection. Control data can be transmitted.
In the present embodiment, the control server 10 stores print control data received from the printing apparatus 12 and extracted character string data based on the print control data. These data are useful data that can be used for analysis of the sales status, sales status, customer visit status, and the like of each product of the printing apparatus 12. That is, the control server 10 according to the present embodiment stores information using the print control data transmitted from the POS terminal 8 to the printing apparatus 12.
In the present embodiment, the extracted character string data is transmitted from the control server 10 to the management device 14. Based on the extracted character string data, the management device 14 determines whether to issue a coupon to the customer. For this reason, the management apparatus 14 can discriminate | determine whether a coupon is issued according to the content of the account of the customer and the merchandise customer which the customer purchased. Moreover, the management apparatus 14 issues the coupon of the content corresponding to the satisfied conditions, when issuing a coupon. For this reason, the management apparatus 14 can issue the coupon of the content according to the customer, the goods which the customer purchased, the content of customer's accounting, etc. The management device 14 can execute various processes such as issuing a corresponding coupon using print control data transmitted from the POS terminal 8 to the printing device 12. Further, when there is an instruction to issue a coupon (transmission of coupon issuance control data) from the management device 14 to the control server 10, the control server 10 transmits the coupon issuance control data using the first WebSocket connection CT1. For this reason, the control server 10 can transmit the coupon issue control data to the printing apparatus 12 without performing processing such as establishing a new connection. Therefore, after a receipt is issued by the printing device 12, a coupon corresponding to the receipt can be issued by the same printing device 12. In the present embodiment, the control server 10 and the management device 14 can execute the various processes described above without changing the contents of the print control data transmitted from the POS terminal 8 to the printing device 12. That is, according to the present embodiment, the control server 10 and the management device 14 can execute the above-described various processes without modifying the POS terminal 8 (such as program modification of the POS application). Therefore, the POS control system 1 can be constructed with almost no changes to the existing system configured by the POS terminal 8 and the printing apparatus 12, and the construction of the POS control system 1 can be simplified.

上述したように、通信制御部25は、発行日時データを印刷制御データに付加し、印刷データ通信部26に送信する(ステップSD10)。印刷データ通信部26は、発行日時データが付加された印刷制御データを制御サーバー10に送信する(ステップSD11、12)。
以下、発行日時データの利用方法について、説明する。
ステップSD11で、印刷データ通信部26は、印刷制御データを送信する前に、第1WebSocketコネクションCT1でのデータの送受信を正常に行える状態か否かを確認する。確認は、例えば、以下のようにして行われる。印刷データ通信部26は、WebSocketコネクションCT1で、印刷データ処理部51に応答要求コマンドを送信する。印刷データ処理部51は、応答要求コマンドを受信した場合に、応答コマンドを送信する機能を有している。印刷データ処理部51は、応答要求コマンドの送信に応じて、所定の期間内に、応答コマンドを受信した場合、WebSocketコネクションCT1でデータの送受信ができる状態であると判別する。一方、印刷データ処理部51は、応答要求コマンドの送信に応じて、所定の期間内に、応答コマンドを受信した場合、WebSocketコネクションCT1で正常にデータの送受信ができない状態であると判別する。確認方法は、上述した方法に限らない。
通信に関するエラー等に起因して、WebSocketコネクションCT1でのデータの送受信ができない場合が生じ得る。
WebSocketコネクションCT1でデータの正常な送受信ができる状態である場合、上述のフローチャートで説明した処理が、行われる。
一方、WebSocketコネクションCT1でデータの正常な送受信ができない状態である場合、印刷データ通信部26は、以下の処理を行う。
印刷データ通信部26は、印刷制御データを印刷装置記憶部39の所定の記憶領域に記憶する。このほか、印刷装置12が、SDメモリーカード等の外付けの記憶媒体のスロットを有している場合は、当該記憶媒体に記憶する構成であってもよい。
As described above, the communication control unit 25 adds the issuance date / time data to the print control data and transmits it to the print data communication unit 26 (step SD10). The print data communication unit 26 transmits the print control data to which the issue date data is added to the control server 10 (steps SD11 and SD12).
Hereinafter, a method of using the issue date data will be described.
In step SD11, before transmitting the print control data, the print data communication unit 26 confirms whether or not the data can be normally transmitted / received through the first WebSocket connection CT1. The confirmation is performed as follows, for example. The print data communication unit 26 transmits a response request command to the print data processing unit 51 through the WebSocket connection CT1. The print data processing unit 51 has a function of transmitting a response command when a response request command is received. If the response command is received within a predetermined period in response to the transmission of the response request command, the print data processing unit 51 determines that data can be transmitted and received through the WebSocket connection CT1. On the other hand, when the response command is received within a predetermined period in response to the transmission of the response request command, the print data processing unit 51 determines that data cannot be normally transmitted / received through the WebSocket connection CT1. The confirmation method is not limited to the method described above.
There may be a case where data cannot be transmitted / received through the WebSocket connection CT1 due to a communication error or the like.
If the WebSocket connection CT1 is in a state where data can be normally transmitted and received, the processing described in the above flowchart is performed.
On the other hand, when the data is not normally transmitted / received via the WebSocket connection CT1, the print data communication unit 26 performs the following processing.
The print data communication unit 26 stores the print control data in a predetermined storage area of the printing device storage unit 39. In addition, when the printing apparatus 12 has a slot for an external storage medium such as an SD memory card, the printing apparatus 12 may be configured to store in the storage medium.

印刷制御データの記憶領域への記憶後、印刷データ通信部26は、WebSocketコネクションCT1で正常にデータの送受信ができる状態となったか否かを監視する。印刷データ通信部26は、例えば以下のようにして、監視を実行する。印刷データ通信部26は、定期的に、第1WebSocketコネクションCT1での応答要求コマンドを送信する。印刷データ通信部26は、応答要求コマンドに対する応答があった場合に、WebSocketコネクションCT1で正常にデータの送受信ができる状態となったと判別する。
WebSocketコネクションCT1で正常にデータの送受信ができる状態となった場合、印刷データ通信部26は、印刷装置記憶部39にアクセスして、当該記憶部に記憶した印刷制御データを、WebSocketコネクションCT1で送信する。印刷制御データには、発行日時データが付加されている。
印刷制御データを受信した制御サーバー10の印刷データ処理部51は、印刷制御データDB57bに1件のレコードを作成する。印刷データ処理部51は、当該レコードで、印刷制御データの送信元の印刷装置12の印刷装置識別情報と、当該レコードを作成したときの日時を示すレコード作成日時と、受信した印刷制御データに基づいて生成した抽出文字列データと、受信した印刷制御データと、受信した印刷制御データに付加された発行日時データと、を対応付けて記憶する(ステップSE5)。
ステップSE5で印刷データ処理部51が生成したレコードには、発行日時データが格納されている。発行日時データは、レシートが発行された日時に対応する日時を示すデータである。
このように、受信した印刷制御データに対応するレコードで、発行日時データが格納されているため、以下の効果を奏する。第1WebSocketコネクションCT1でデータの送受信が正常に行えなかったことに起因して、レシートを発行した日時と、対応する印刷制御データが制御サーバー10に送信された日時とが乖離した場合であっても、対応するレコードの発行日時データを取得することにより、レシートの発行日時を取得できる。このため、例えば、印刷制御データDB57bに基づいて、時間帯ごとのレシート発行枚数を調査することができる。
また、1のレコードのレコード作成日時と、発行日時データが示す日時との乖離状況を分析することにより、第1WebSocketコネクションCT1での通信の遅延状況を把握することが可能である。
After storing the print control data in the storage area, the print data communication unit 26 monitors whether or not data can be normally transmitted and received by the WebSocket connection CT1. The print data communication unit 26 performs monitoring as follows, for example. The print data communication unit 26 periodically transmits a response request command in the first WebSocket connection CT1. When there is a response to the response request command, the print data communication unit 26 determines that data can be normally transmitted and received through the WebSocket connection CT1.
When the WebSocket connection CT1 is able to transmit and receive data normally, the print data communication unit 26 accesses the printing device storage unit 39 and transmits the print control data stored in the storage unit via the WebSocket connection CT1. To do. Issue date data is added to the print control data.
The print data processing unit 51 of the control server 10 that has received the print control data creates one record in the print control data DB 57b. The print data processing unit 51 is based on the printing device identification information of the printing device 12 that is the transmission source of the print control data, the record creation date and time indicating the date and time when the record was created, and the received print control data. The extracted character string data generated in this manner, the received print control data, and the issue date data added to the received print control data are stored in association with each other (step SE5).
Issuance date / time data is stored in the record generated by the print data processing unit 51 in step SE5. The issue date data is data indicating the date corresponding to the date when the receipt was issued.
As described above, since the issue date data is stored in the record corresponding to the received print control data, the following effects are obtained. Even when the date and time when the receipt is issued and the date and time when the corresponding print control data is transmitted to the control server 10 are different from each other due to the fact that the first WebSocket connection CT1 cannot transmit and receive data normally. By obtaining the issue date data of the corresponding record, the issue date of the receipt can be obtained. For this reason, for example, based on the print control data DB 57b, the number of receipts issued for each time zone can be investigated.
Further, by analyzing the divergence state between the record creation date and time of one record and the date and time indicated by the issue date and time data, it is possible to grasp the delay state of communication in the first WebSocket connection CT1.

以上のように、印刷装置12は、POS端末8から送信された印刷制御データに基づくレシートの発行、及び、管理装置14から制御サーバー10を介して送信されたクーポン発行制御データに基づくクーポンの発行を行う。
従って、印刷装置12に対して、印刷制御データとクーポン発行制御データとが、重なった時間に送信される可能性がある。本実施形態に係る印刷装置12は、このような場合であっても、各データに基づく処理を実行する。以下、詳述する。
図10は、印刷装置12の動作を示すフローチャートである。
図10に示すフローチャートの説明では、通信制御部25、及び、印刷データ通信部26を区別せずに表現する場合、「制御機能部」と表現する。
印刷装置12の印刷制御部29は、通信制御部25から印刷制御データを受信したか、又は、印刷データ通信部26からクーポン発行制御データを受信したかを監視する(ステップSG1)。
ステップSG1の監視は、例えば、以下の方法で行われる。
例えば、印刷制御部29は、通信制御部25が受信したデータを一時記憶する受信バッファーの状態と、印刷データ通信部26が受信したデータを一時記憶する受信バッファーの状態とを監視する。そして、いずれかの受信バッファーにデータの書き込みがあった場合、対応する制御機能部がデータを受信したと判別する。
As described above, the printing apparatus 12 issues a receipt based on the print control data transmitted from the POS terminal 8 and issues a coupon based on the coupon issuance control data transmitted from the management apparatus 14 via the control server 10. I do.
Therefore, there is a possibility that the printing control data and the coupon issue control data are transmitted to the printing apparatus 12 at the time when they overlap. Even in such a case, the printing apparatus 12 according to the present embodiment executes processing based on each data. Details will be described below.
FIG. 10 is a flowchart showing the operation of the printing apparatus 12.
In the description of the flowchart illustrated in FIG. 10, when the communication control unit 25 and the print data communication unit 26 are expressed without distinction, they are expressed as “control function unit”.
The print control unit 29 of the printing apparatus 12 monitors whether print control data has been received from the communication control unit 25 or whether coupon issue control data has been received from the print data communication unit 26 (step SG1).
The monitoring of step SG1 is performed by the following method, for example.
For example, the print control unit 29 monitors the state of the reception buffer that temporarily stores the data received by the communication control unit 25 and the state of the reception buffer that temporarily stores the data received by the print data communication unit 26. When data is written in any of the reception buffers, it is determined that the corresponding control function unit has received the data.

いずれかの制御機能部からデータを受信した場合(ステップSG1:YES)、印刷制御部29は、印刷制御部29に対してデータを送信していない制御機能部による印刷制御部29へのデータの送信を禁止する(ステップSG2)。以下の説明では、印刷制御部29に対してデータを送信した制御機能部を「対象制御機能部」と表現し、印刷制御部29に対してデータを送信していない方の制御機能部を、「非対象制御機能部」と表現する。
ステップSG2では、印刷制御部29は、通信制御部25から印刷制御データを受信した場合、印刷データ通信部26がクーポン発行制御コマンドを印刷制御部29へ送信することを禁止する。一方、印刷制御部29は、印刷データ通信部26からクーポン発行制御データを受信した場合、通信制御部25が印刷制御データを印刷制御部29へ送信することを禁止する。
ステップSG2において、印刷制御部29は、非対象制御機能部に対して、印刷制御部29へのデータの送信を禁止する旨の送信禁止通知を行う。制御機能部は、当該通知を受けた場合、データの送信の禁止を解除する旨の送信禁止解除通知(後述)を受信するまでは、外部装置(POS端末8、又は、制御サーバー10)からデータを受信した場合であっても、印刷制御部29に対してデータを送信せず、外部装置から受信したデータを受信バッファーに記憶した状態を維持する。
次いで、印刷制御部29は、対象制御機能部からデータを受信し、受信したデータをプリンター制御部40に送信して、印刷部41による処理を開始する(ステップSG3)。対象制御機能部が通信制御部25である場合、印刷制御部29は、通信制御部25から印刷制御データを受信し、受信した印刷制御データをプリンター制御部40に送信して、印刷部41によるレシートの発行の処理を開始する。また、対象制御機能部が印刷データ通信部26である場合、印刷制御部29は、印刷データ通信部26からクーポン発行制御コマンドを受信し、受信したクーポン発行制御コマンドをプリンター制御部40に送信して、印刷部41によるクーポンの発行の処理を開始する。
When data is received from any of the control function units (step SG1: YES), the print control unit 29 sends data to the print control unit 29 by the control function unit that has not transmitted data to the print control unit 29. Transmission is prohibited (step SG2). In the following description, a control function unit that transmits data to the print control unit 29 is expressed as a “target control function unit”, and a control function unit that does not transmit data to the print control unit 29 is represented as: Expressed as “non-target control function”.
In step SG <b> 2, when the print control unit 29 receives print control data from the communication control unit 25, the print control unit 29 prohibits the print data communication unit 26 from transmitting a coupon issue control command to the print control unit 29. On the other hand, when receiving the coupon issue control data from the print data communication unit 26, the print control unit 29 prohibits the communication control unit 25 from transmitting the print control data to the print control unit 29.
In step SG2, the print control unit 29 notifies the non-target control function unit of transmission prohibition to prohibit transmission of data to the print control unit 29. When receiving the notification, the control function unit receives data from the external device (POS terminal 8 or control server 10) until receiving a transmission prohibition cancellation notification (to be described later) to cancel the prohibition of data transmission. Is received, the data is not transmitted to the print control unit 29, and the state in which the data received from the external device is stored in the reception buffer is maintained.
Next, the print control unit 29 receives data from the target control function unit, transmits the received data to the printer control unit 40, and starts processing by the printing unit 41 (step SG3). When the target control function unit is the communication control unit 25, the print control unit 29 receives the print control data from the communication control unit 25, transmits the received print control data to the printer control unit 40, and the printing unit 41 Start the receipt issuance process. When the target control function unit is the print data communication unit 26, the print control unit 29 receives a coupon issue control command from the print data communication unit 26 and transmits the received coupon issue control command to the printer control unit 40. Then, the coupon issuing process by the printing unit 41 is started.

次いで、印刷制御部29は、印刷部41による処理(レシートの発行、又は、クーポンの発行)が完了したか否かを監視する(ステップSG4)。例えば、印刷制御部29は、上述した処理結果通知データを受信した場合、印刷部41による処理が完了したと判別する。
次いで、印刷制御部29は、期間T1の計時を開始する(ステップSG5)。期間T1は、例えば、1秒である。
次いで、印刷制御部29は、期間T1が経過する前に対象制御機能部からデータを受信したか否かを監視し(ステップSG6)、また、対象制御機能部からデータを受信することなく期間T1が経過したか否かを監視する(ステップSG7)。
期間T1が経過する前に、対象制御機能部からデータを受信した場合(ステップSG6:YES)、印刷制御部29は、処理手順をステップSG3へ戻し、受信したデータをプリンター制御部40に送信して、印刷部41による処理を開始する。
対象制御機能部からデータを受信することなく期間T1が経過した場合(ステップSG7:YES)、印刷制御部29は、非対称制御機能部について、印刷制御部29に対するデータの送信の禁止を解除する(ステップSG8)。
本例では、ステップSG8において、印刷制御部29は、非対象制御機能部に対して、印刷制御部29へのデータの送信の禁止を解除する旨の送信禁止解除通知を行う。制御機能部は、当該通知を受けた場合、印刷制御部29に対してデータを送信可能となる。その後、印刷制御部29は、処理手順をステップSG1へ戻す。
Next, the print control unit 29 monitors whether or not the processing (issue of receipt or issue of coupon) by the printing unit 41 is completed (step SG4). For example, the print control unit 29 determines that the processing by the printing unit 41 is completed when the processing result notification data described above is received.
Next, the print control unit 29 starts counting time T1 (step SG5). The period T1 is, for example, 1 second.
Next, the print control unit 29 monitors whether or not data has been received from the target control function unit before the period T1 elapses (step SG6), and the period T1 without receiving data from the target control function unit. Is monitored (step SG7).
If data is received from the target control function unit before the period T1 has elapsed (step SG6: YES), the print control unit 29 returns the processing procedure to step SG3, and transmits the received data to the printer control unit 40. Then, the processing by the printing unit 41 is started.
When the period T1 has passed without receiving data from the target control function unit (step SG7: YES), the print control unit 29 cancels the prohibition of data transmission to the print control unit 29 for the asymmetric control function unit ( Step SG8).
In this example, in step SG8, the print control unit 29 notifies the non-target control function unit of a transmission prohibition cancellation notification to cancel the prohibition of data transmission to the print control unit 29. When receiving the notification, the control function unit can transmit data to the print control unit 29. Thereafter, the print control unit 29 returns the processing procedure to Step SG1.

以上説明したように、印刷制御部29は、印刷制御データに基づく印刷部41の制御、及び、クーポン発行制御コマンド(クーポン発行制御データ)に基づく印刷部41の制御を切り替えて実行する。
このような構成のため、POS端末8から印刷装置12に対する印刷制御データの送信、及び、制御サーバー10から印刷装置12に対するクーポン発行制御データの送信が同時に行われた場合であっても、印刷制御部29は、一方のデータに基づく処理が完了した後、他方のデータに基づく処理が実行する。従って、このような場合であっても、印刷装置12が受信したデータが混合する等、印刷制御部29に対して同時にデータが送信されることに起因したエラーが発生することがない。
As described above, the print control unit 29 switches and executes the control of the printing unit 41 based on the print control data and the control of the printing unit 41 based on the coupon issue control command (coupon issue control data).
Due to such a configuration, even when transmission of print control data from the POS terminal 8 to the printing apparatus 12 and transmission of coupon issue control data from the control server 10 to the printing apparatus 12 are performed simultaneously, printing control is performed. After the process based on one data is completed, the unit 29 executes a process based on the other data. Therefore, even in such a case, an error caused by simultaneous transmission of data to the print control unit 29 such as mixing of data received by the printing apparatus 12 does not occur.

次に、印刷装置12が備えるデバイス(本例では、カードリーダーCR、及び、バーコードリーダーBR)が印刷装置12に対してデータを送信した場合の各装置の動作について説明する。
図11は、カードリーダーCRによって顧客の会員カードが読み取られた場合の印刷装置12、制御サーバー10、及び、管理装置14の動作を示すフローチャートである。図11(A)は印刷装置12の動作を、(B)は制御サーバー10の動作を、(C)は管理装置14の動作を示す。
図11(A)に示すように、カードリーダーCRによる会員カードが読み取られると(ステップSH1)、カードリーダーCRからカードリーダーデータ通信部28に対して読み取り結果を示す読取結果データが送信される(ステップSH2)。読取結果データは、バイナリーデータである。読取結果データには、顧客の会員番号を示す情報が含まれる。
以下の説明では、第2機能部間通信経路KT2によりカードリーダーデータ通信部28と、カードリーダー処理部53との通信についても併せて説明する。
カードリーダーデータ通信部28は、受信した読取結果データに、現在日時を示す情報(以下、「読取日時情報」という。)を含め、読取結果データ、及び、カードリーダー識別情報データ(後述)を、第2通信部31に送信する(ステップSH3)。読取日時情報は、カードリーダーCRによる読み取りが行われた日時を示す情報である。
ステップSH3の処理について詳述する。
カードリーダー識別情報データは、カードリーダー識別情報を示すデータである。カードリーダー識別情報は、カードリーダーCRを識別するデバイス識別情報である。デバイス識別情報は、デバイス(本例では、カードリーダーCR、バーコードリーダーBR)に対して、割り振られた識別情報であり、デバイスごとに、その値が異なっている。デバイス識別情報は、例えば、プロダクトIDと、ベンダーIDの組合せである。
カードリーダーCRが印刷装置12に接続されたときに、カードリーダーCRからカードリーダーデータ通信部28に対して、所定のプロトコルに従ってカードリーダー識別情報が通知される。カードリーダーデータ通信部28は、受信したカードリーダー識別情報を示すカードリーダー識別情報データを所定の記憶領域に記憶する。
ステップSH3で、カードリーダーデータ通信部28は、読取結果データと共に、所定の記憶領域に記憶したカードリーダー識別情報データを、第2通信部31に送信する。
第2通信部31は、受信した読取結果データ、及び、カードリーダー識別情報データを、第2WebSocketコネクションCT2により、制御サーバー10に送信する(ステップSH4)。
Next, the operation of each device when devices (card reader CR and barcode reader BR in this example) included in the printing apparatus 12 transmit data to the printing apparatus 12 will be described.
FIG. 11 is a flowchart showing operations of the printing device 12, the control server 10, and the management device 14 when the customer's membership card is read by the card reader CR. FIG. 11A shows the operation of the printing apparatus 12, (B) shows the operation of the control server 10, and (C) shows the operation of the management apparatus 14.
As shown in FIG. 11A, when the membership card is read by the card reader CR (step SH1), the reading result data indicating the reading result is transmitted from the card reader CR to the card reader data communication unit 28 ( Step SH2). The read result data is binary data. The reading result data includes information indicating the customer membership number.
In the following description, communication between the card reader data communication unit 28 and the card reader processing unit 53 is also described along the second functional unit communication path KT2.
The card reader data communication unit 28 includes, in the received reading result data, information indicating the current date and time (hereinafter referred to as “reading date information”), reading result data, and card reader identification information data (described later). It transmits to the 2nd communication part 31 (step SH3). The reading date / time information is information indicating the date / time when reading by the card reader CR was performed.
The process of step SH3 will be described in detail.
The card reader identification information data is data indicating card reader identification information. The card reader identification information is device identification information for identifying the card reader CR. The device identification information is identification information assigned to a device (in this example, a card reader CR and a barcode reader BR), and the value is different for each device. The device identification information is, for example, a combination of a product ID and a vendor ID.
When the card reader CR is connected to the printing apparatus 12, card reader identification information is notified from the card reader CR to the card reader data communication unit 28 according to a predetermined protocol. The card reader data communication unit 28 stores card reader identification information data indicating the received card reader identification information in a predetermined storage area.
In step SH <b> 3, the card reader data communication unit 28 transmits the card reader identification information data stored in the predetermined storage area together with the read result data to the second communication unit 31.
The second communication unit 31 transmits the received reading result data and card reader identification information data to the control server 10 through the second WebSocket connection CT2 (step SH4).

第2接続部55は、第2WebSocketコネクションCT2により、読取結果データ、及び、カードリーダー識別情報データを受信する(ステップSI1)。
第2接続部55は、受信した読取結果データ、及び、カードリーダー識別情報データを、カードリーダー処理部53に送信する(ステップSI2)。
カードリーダー処理部53は、受信した読取結果データを、RAM等に形成されたワークエリアに記憶する。次いで、カードリーダー処理部53は、読取結果データに含まれる顧客の会員番号を示す文字列を抽出し、抽出した会員番号を示す文字列のテキスト(文字データ)を含むテキストファイルである会員番号データ(デバイスデータ)を生成する(ステップSI3)。
次いで、カードリーダー処理部53は、制御サーバー記憶部57が記憶する会員番号データDB57dにアクセスする(ステップSI4)。
図9(B)は、会員番号データDB57dの1件のレコードのデータ構造を示す図である。
図9(B)に示すように、会員番号データDB57dの1件のレコードは、印刷装置識別情報と、レコード作成日時と、会員番号データと、読取結果データと、読取日時データと、デバイス識別情報データと、を対応付けて記憶する。なお、レコード作成日時とは、レコードを作成した日時を示す情報である。
次いで、カードリーダー処理部53は、会員番号データDB57dに1件のレコードを作成し、当該レコードの対応するフィールドに、印刷制御データの送信元の印刷装置12の印刷装置識別情報を格納する。また、カードリーダー処理部53は、当該レコードの対応するフィールドに、当該レコードを作成したときの日時を示すレコード作成日時を格納する。また、カードリーダー処理部53は、当該レコードの対応するフィールドに、受信した読取結果データに基づいて生成した会員番号データを格納する。また、カードリーダー処理部53は、当該レコードの対応するフィールドに、受信した読取結果データを格納する。また、カードリーダー処理部53は、当該レコードの対応するフィールドに、読取結果データに含まれる読取日時情報を示すデータである読取日時データを格納する。また、カードリーダー処理部53は、当該レコードの対応するフィールドに、デバイス識別情報データ(本例では、カードリーダー識別情報データ)を格納する(ステップSI5)。
The second connection unit 55 receives the read result data and the card reader identification information data through the second WebSocket connection CT2 (step SI1).
The second connection unit 55 transmits the received reading result data and card reader identification information data to the card reader processing unit 53 (step SI2).
The card reader processing unit 53 stores the received reading result data in a work area formed in a RAM or the like. Next, the card reader processing unit 53 extracts a character string indicating the member number of the customer included in the read result data, and member number data which is a text file including text (character data) of the character string indicating the extracted member number (Device data) is generated (step SI3).
Next, the card reader processing unit 53 accesses the member number data DB 57d stored in the control server storage unit 57 (step SI4).
FIG. 9B shows the data structure of one record in the member number data DB 57d.
As shown in FIG. 9B, one record in the member number data DB 57d includes printing device identification information, record creation date / time, member number data, read result data, read date / time data, and device identification information. Data is stored in association with each other. Note that the record creation date and time is information indicating the date and time when the record was created.
Next, the card reader processing unit 53 creates one record in the member number data DB 57d, and stores the printing device identification information of the printing device 12 that is the transmission source of the print control data in the corresponding field of the record. Further, the card reader processing unit 53 stores the record creation date and time indicating the date and time when the record was created in the corresponding field of the record. Further, the card reader processing unit 53 stores member number data generated based on the received reading result data in the corresponding field of the record. Further, the card reader processing unit 53 stores the received reading result data in the corresponding field of the record. Further, the card reader processing unit 53 stores reading date / time data, which is data indicating reading date / time information included in the reading result data, in a corresponding field of the record. Further, the card reader processing unit 53 stores device identification information data (in this example, card reader identification information data) in the corresponding field of the record (step SI5).

次いで、カードリーダー処理部53は、会員番号データ、及び、読取結果データの送信元の印刷装置12の印刷装置識別情報を示すデータを、通信管理部50に送信する(ステップSI6)。
通信管理部50は、制御サーバー記憶部57が記憶する管理装置管理DB57cを参照する(ステップSI7)。
次いで、通信管理部50は、カードリーダー処理部53から受信したデータが示す印刷装置識別情報をキーとして、管理装置管理DB57cで当該識別情報と対応付けられた管理装置14のアドレスを取得する(ステップSI8)。
次いで、通信管理部50は、制御サーバー通信I/F58を制御して、ステップSI8で取得したアドレスの管理装置14に会員番号データ、及び、カードリーダー識別情報データを送信する(ステップSI9)。
Next, the card reader processing unit 53 transmits the member number data and data indicating the printing device identification information of the printing device 12 that is the transmission source of the read result data to the communication management unit 50 (step SI6).
The communication management unit 50 refers to the management device management DB 57c stored in the control server storage unit 57 (step SI7).
Next, using the printing device identification information indicated by the data received from the card reader processing unit 53 as a key, the communication management unit 50 obtains the address of the management device 14 associated with the identification information in the management device management DB 57c (step). SI8).
Next, the communication management unit 50 controls the control server communication I / F 58 to transmit the member number data and the card reader identification information data to the management device 14 at the address acquired in Step SI8 (Step SI9).

図11(C)に示すように、管理装置制御部70は、管理装置通信I/F71を制御して、会員番号データ、及び、カードリーダー識別情報データを受信する(ステップSJ1)。
次いで、管理装置制御部70は、会員番号データ、及び、カードリーダー識別情報データに基づいて、対応する処理を実行する(ステップSJ2)。
例えば、ステップSJ2で、管理装置制御部70は、会員番号データが示す会員番号と、カードリーダー識別情報データが示すデバイス識別情報と、現在日時を示す情報とを対応付けて記憶する。記憶した情報は、会員の来店履歴として用いることができ、店舗に来店する顧客の傾向等の分析に用いることができる。また、記憶したデバイス識別情報に基づいて、会員番号が、カードリーダーCRの読み取りに結果に基づくものであることを把握できる。
管理装置制御部70は、会員番号データが示す会員番号に応じたクーポンの発行を指示する。
会員番号データが示す会員番号の顧客に対して、店舗に関する情報や、クーポンが記載されたメールを送信したり、ポイントシステムが存在する場合は、顧客に対してポイントを付与したりする。
なお、カードリーダー処理部53は、会員番号データ及びカードリーダー識別情報データと共に、上述した店舗情報を送信する構成であってもよい。この構成によれば、管理装置制御部70は、例えば、店舗に応じた来店履歴を管理でき、また、店舗に応じて、来店顧客の傾向等を分析できる。
以上、カードリーダーCRによるカードの読み取りが行われた後の各装置の動作を説明したが、バーコードリーダーBRによってバーコードが読み取られた場合も、読み取り結果に基づくデータが、印刷装置12により制御サーバー10に送信され、制御サーバー10で対応する処理が実行される。また、制御サーバー10から管理装置14にデータが素心去れ、管理装置14で対応する処理が実行される。
As shown in FIG. 11C, the management device control unit 70 controls the management device communication I / F 71 to receive member number data and card reader identification information data (step SJ1).
Next, the management device control unit 70 executes a corresponding process based on the member number data and the card reader identification information data (step SJ2).
For example, in step SJ2, the management apparatus control unit 70 stores the member number indicated by the member number data, device identification information indicated by the card reader identification information data, and information indicating the current date and time in association with each other. The stored information can be used as a member's store visit history, and can be used for analyzing the tendency of customers who visit the store. Further, it is possible to grasp that the membership number is based on the result of reading by the card reader CR based on the stored device identification information.
The management device control unit 70 issues an instruction to issue a coupon corresponding to the member number indicated by the member number data.
For the customer whose membership number is indicated by the membership number data, information on the store or an email in which a coupon is written is transmitted, or when there is a point system, points are given to the customer.
The card reader processing unit 53 may be configured to transmit the store information described above together with the member number data and the card reader identification information data. According to this structure, the management apparatus control part 70 can manage the store visit history according to a store, for example, and can analyze the tendency etc. of a store visitor according to a store.
The operation of each device after the card is read by the card reader CR has been described above. Even when the barcode is read by the barcode reader BR, data based on the reading result is controlled by the printing device 12. The data is transmitted to the server 10 and corresponding processing is executed by the control server 10. In addition, data is removed from the control server 10 to the management device 14, and a corresponding process is executed by the management device 14.

このように、本実施形態では、印刷装置12は、インターフェース基板20に配設された拡張機能、すなわち、カードリーダー処理部53、及び、バーコードリーダーデータ通信部27の機能により、デバイスから送信されたデータを制御サーバー10に送信できる。その際、印刷装置12は、第1WebSocketコネクションCT1を用いて印刷制御データを送信するため、デバイスからデータを受信した場合、新たにコネクションを確立する等の処理をすることなく、データを送信できる。
また、本実施形態では、制御サーバー10は、印刷装置12から受信した読取結果データ、及び、読取結果データに基づく会員番号データを記憶する。これらデータは、店舗の、または、印刷装置12の顧客の来店の状況等の分析に用いることが可能なデータである。制御サーバー10は、印刷装置12にデバイスが接続されることを用いて、情報を記憶する。
また、本実施形態では、制御サーバー10から、管理装置14に対して、会員番号データが送信される。管理装置14は、会員番号データに基づいて、対応する処理を実行する。つまり、本実施形態に係る管理装置14は、印刷装置12にデバイスが接続されることを用いて、対応する処理を実行できる。
As described above, in this embodiment, the printing apparatus 12 is transmitted from the device by the extended functions provided on the interface board 20, that is, the functions of the card reader processing unit 53 and the barcode reader data communication unit 27. Data can be transmitted to the control server 10. At that time, since the printing apparatus 12 transmits the print control data using the first WebSocket connection CT1, when the data is received from the device, the printing apparatus 12 can transmit the data without performing a process such as newly establishing a connection.
In the present embodiment, the control server 10 stores the read result data received from the printing apparatus 12 and the membership number data based on the read result data. These data are data that can be used for analysis of the situation of the store or the customer of the printing device 12 visiting the store. The control server 10 stores information by using a device connected to the printing apparatus 12.
In the present embodiment, the member number data is transmitted from the control server 10 to the management device 14. The management device 14 executes a corresponding process based on the membership number data. That is, the management apparatus 14 according to the present embodiment can execute a corresponding process by using a device connected to the printing apparatus 12.

以上説明したように、本実施形態に係るPOS制御システム1は、POS端末8と、印刷装置12と、制御サーバー10(制御装置)と、を備える。
POS端末8は、決済処理に基づいて印刷制御データを生成するPOS端末制御部45(制御部)、及び印刷制御データを送信する端末通信インターフェース46(通信部)を有する。
印刷装置12は、印刷を行う印刷部41、印刷制御データに基づいて印刷部41を制御する印刷制御部29、POS端末8と接続して印刷制御データを受信するUSB通信接続部34(通信接続部)、及び印刷制御データを第1WebSocketコネクションCT1により非同期の双方向通信で送信する印刷データ通信部26を有する。
制御サーバー10は、印刷装置12の印刷データ通信部26で送信された印刷制御データを第1WebSocketコネクションCT1で受信する第1接続部54(受信部)、及び受信した印刷制御データに基づく処理を行う印刷データ処理部51を有する。
この構成によれば、POS端末8から印刷装置12に対して送信された印刷制御データは、印刷データ通信部26の機能によって制御サーバー10に送信される。このため、制御サーバー10は、受信した印刷制御データに基づいて、対応する処理を実行できる。また、印刷装置12は、非同期の双方向通信で印刷制御データを制御サーバー10に送信する。従って、印刷装置12は、POS端末8から印刷制御データを受信した場合、通信経路を新たに確立することなく、また、制御サーバー10との間で通信の同期をとることなく、制御サーバー10に印刷制御データを送信できる。このため、POS端末8から印刷装置12に印刷制御データを送信するPOS制御システム1について、印刷装置12にネットワークを介して接続された制御サーバー10が印刷制御データに基づく処理をできるようにでき、当該システムを、印刷装置12と制御サーバー10とがネットワークGNを介して通信する構成に対応させることができる。
As described above, the POS control system 1 according to the present embodiment includes the POS terminal 8, the printing device 12, and the control server 10 (control device).
The POS terminal 8 includes a POS terminal control unit 45 (control unit) that generates print control data based on a settlement process, and a terminal communication interface 46 (communication unit) that transmits print control data.
The printing apparatus 12 includes a printing unit 41 that performs printing, a printing control unit 29 that controls the printing unit 41 based on the printing control data, and a USB communication connection unit 34 that connects to the POS terminal 8 and receives printing control data (communication connection). And a print data communication unit 26 that transmits print control data by asynchronous two-way communication using the first WebSocket connection CT1.
The control server 10 performs processing based on the first connection unit 54 (reception unit) that receives the print control data transmitted by the print data communication unit 26 of the printing apparatus 12 through the first WebSocket connection CT1, and the received print control data. A print data processing unit 51 is included.
According to this configuration, the print control data transmitted from the POS terminal 8 to the printing device 12 is transmitted to the control server 10 by the function of the print data communication unit 26. Therefore, the control server 10 can execute a corresponding process based on the received print control data. Further, the printing apparatus 12 transmits print control data to the control server 10 by asynchronous two-way communication. Therefore, when the printing apparatus 12 receives the print control data from the POS terminal 8, the printing apparatus 12 does not establish a new communication path and does not synchronize communication with the control server 10 without sending communication to the control server 10. Print control data can be sent. Therefore, with respect to the POS control system 1 that transmits print control data from the POS terminal 8 to the printing device 12, the control server 10 connected to the printing device 12 via the network can perform processing based on the print control data. The system can correspond to a configuration in which the printing apparatus 12 and the control server 10 communicate via the network GN.

また、本実施形態では、印刷制御データは、バイナリーデータであり、制御サーバー10の印刷データ処理部51は、印刷制御データに含まれる文字列を抽出し、抽出した文字列を含むテキストデータである抽出文字列データを生成する。
この構成によれば、制御サーバー10は、受信した印刷制御データを、利用性の高いデータに変換できる。
In the present embodiment, the print control data is binary data, and the print data processing unit 51 of the control server 10 extracts character strings included in the print control data and is text data including the extracted character strings. Generate extracted string data.
According to this configuration, the control server 10 can convert the received print control data into highly usable data.

また、制御サーバー10は、印刷制御データと、抽出文字列データとを対応付けて記憶する制御サーバー記憶部57を有する。
この構成によれば、制御サーバー10は、印刷制御データと、印刷制御データに基づく抽出文字列データを記憶するため、後に、いずれかのデータを分析し、情報を得ることが可能である。また、印刷制御データを記憶することにより、印刷制御データに基づいて抽出文字列データを生成する際に欠落する情報も、記憶できる。また、印刷制御データを記憶するため、印刷制御データを利用した再印刷を行える。
The control server 10 also includes a control server storage unit 57 that stores print control data and extracted character string data in association with each other.
According to this configuration, since the control server 10 stores the print control data and the extracted character string data based on the print control data, it is possible to later analyze any data and obtain information. Further, by storing the print control data, it is possible to store information that is missing when the extracted character string data is generated based on the print control data. Further, since print control data is stored, reprinting using the print control data can be performed.

また、印刷装置12は、POS端末8で送信した印刷制御データを、印刷制御部29及び印刷データ通信部26に送信する通信制御部25を有する。
この構成によれば、通信制御部25の機能により、印刷制御データを印刷制御部29に送信して印刷部41により印刷を行い、印刷制御データを印刷データ通信部26に送信して、印刷制御データを制御サーバー10に送信できる。
The printing apparatus 12 includes a communication control unit 25 that transmits the print control data transmitted from the POS terminal 8 to the print control unit 29 and the print data communication unit 26.
According to this configuration, the print control data is transmitted to the print control unit 29 by the function of the communication control unit 25 and printing is performed by the printing unit 41, and the print control data is transmitted to the print data communication unit 26 to perform the print control. Data can be sent to the control server 10.

また、印刷装置12の印刷制御部29は、印刷部41による印刷を行った後、印刷を行ったことを示す処理結果通知データ(通知データ)を通信制御部25に送信し、印刷装置12の通信制御部25は、処理結果通知データを受信した後、印刷制御データを印刷データ通信部26に送信する。
この構成によれば、印刷装置12は、印刷部41による印刷が完了した後、行われた印刷に対応する印刷制御データを、制御サーバー10に送信できる。
In addition, after printing by the printing unit 41, the printing control unit 29 of the printing apparatus 12 transmits processing result notification data (notification data) indicating that printing has been performed to the communication control unit 25, and After receiving the processing result notification data, the communication control unit 25 transmits the print control data to the print data communication unit 26.
According to this configuration, the printing apparatus 12 can transmit print control data corresponding to the performed printing to the control server 10 after the printing by the printing unit 41 is completed.

なお、上述した実施の形態は、あくまでも本発明の一態様を示すものであり、本発明の範囲内で任意に変形および応用が可能である。
例えば、上述した実施形態では、デバイスの例として、カードリーダーCRや、バーコードリーダーBRを挙げたが、印刷装置12に接続されるデバイスは例示したものに限らない。例えば、デバイスとしては、キャッシュレジスター、表示パネル、タッチパネル等がある。
また、抽出文字列データに基づいて管理装置14が行う処理は、クーポンの発行に限らない。例えば、抽出文字列データの一部又は全部を記憶する処理を行ってもよい。また、抽出文字列データに基づいて、顧客マスターを参照して、顧客のメールアドレスを取得し、顧客にメールする処理を行ってもよい。
また、上述した実施形態では、印刷装置12は店舗に用いられる店舗システム11に設けられていた。しかしながら、印刷装置12は、必ずしも、店舗システム11に設けられたものでなくてもよい。例えば、他のシステムに設けられたものであってもよい。
また、図3に示す各機能ブロックはハードウェアとソフトウェアにより実現可能であり、特定のハードウェア構成を示唆するものではない。また、印刷装置12の機能を、当該装置に外部接続される別の装置に持たせるようにしてもよい。また、印刷装置12は、外部接続される記憶媒体に記憶させたプログラムを実行することにより、各種処理を実行しても良い。
The above-described embodiment is merely an aspect of the present invention, and can be arbitrarily modified and applied within the scope of the present invention.
For example, in the above-described embodiment, the card reader CR and the barcode reader BR are given as examples of the device, but the device connected to the printing apparatus 12 is not limited to the example. For example, the device includes a cash register, a display panel, a touch panel, and the like.
Moreover, the process which the management apparatus 14 performs based on extracted character string data is not restricted to issue of a coupon. For example, a process of storing part or all of the extracted character string data may be performed. Further, referring to the customer master based on the extracted character string data, the customer's mail address may be acquired, and the mail may be mailed to the customer.
In the above-described embodiment, the printing apparatus 12 is provided in the store system 11 used in the store. However, the printing apparatus 12 is not necessarily provided in the store system 11. For example, it may be provided in another system.
Each functional block shown in FIG. 3 can be realized by hardware and software, and does not suggest a specific hardware configuration. Further, the function of the printing apparatus 12 may be provided to another apparatus externally connected to the apparatus. Further, the printing apparatus 12 may execute various processes by executing a program stored in an externally connected storage medium.

1…POS制御システム、8…POS端末(外部装置)、10…制御サーバー(制御装置)、12…印刷装置、25…通信制御部、26…印刷データ通信部、29…通信制御部、34…USB通信接続部(通信接続部)、35…LAN通信接続部(通信接続部)、36…シリアル通信接続部(通信接続部)、41…印刷部、45…POS端末制御部(制御部)、46…端末通信インターフェース(通信部)、51…印刷データ処理部、54…第1接続部(受信部)、57…制御サーバー記憶部(記憶部)。   DESCRIPTION OF SYMBOLS 1 ... POS control system, 8 ... POS terminal (external device), 10 ... Control server (control device), 12 ... Printing device, 25 ... Communication control part, 26 ... Print data communication part, 29 ... Communication control part, 34 ... USB communication connection unit (communication connection unit), 35 ... LAN communication connection unit (communication connection unit), 36 ... Serial communication connection unit (communication connection unit), 41 ... Printing unit, 45 ... POS terminal control unit (control unit), 46... Terminal communication interface (communication unit) 51... Print data processing unit 54... First connection unit (reception unit) 57 57 control server storage unit (storage unit)

Claims (8)

決済処理に基づいて印刷制御データを生成する制御部、及び前記印刷制御データを送信する通信部を有するPOS端末と、
印刷を行う印刷部、前記印刷制御データに基づいて前記印刷部を制御する印刷制御部、前記POS端末と接続して前記印刷制御データを受信する通信接続部、及び前記印刷制御データを非同期の双方向通信で送信する印刷データ通信部を有する印刷装置と、
前記印刷データ通信部と通信経路を確立して前記印刷装置の前記印刷データ通信部で送信された前記印刷制御データを受信する受信部、及び受信した前記印刷制御データに基づく処理を行う印刷データ処理部を有する制御装置と、
を備えることを特徴とするPOS制御システム。
A POS terminal having a control unit that generates print control data based on a settlement process, and a communication unit that transmits the print control data;
A printing unit that performs printing, a printing control unit that controls the printing unit based on the printing control data, a communication connection unit that connects to the POS terminal and receives the printing control data, and asynchronously transmits the printing control data. A printing apparatus having a print data communication unit to be transmitted by bidirectional communication;
A receiving unit that establishes a communication path with the print data communication unit and receives the print control data transmitted by the print data communication unit of the printing apparatus, and a print data process that performs processing based on the received print control data A control device having a section;
A POS control system comprising:
前記印刷制御データは、バイナリーデータであり、
前記制御装置の前記印刷データ処理部は、前記印刷制御データに含まれる文字列を抽出し、抽出した文字列を含むテキストデータを生成する請求項1に記載のPOS制御システム。
The print control data is binary data,
The POS control system according to claim 1, wherein the print data processing unit of the control device extracts a character string included in the print control data and generates text data including the extracted character string.
前記制御装置は、
前記印刷制御データと前記テキストデータとを対応付けて記憶する記憶部を有する請求項2に記載のPOS制御システム。
The controller is
The POS control system according to claim 2, further comprising a storage unit that stores the print control data and the text data in association with each other.
前記印刷装置は、
前記POS端末で送信した前記印刷制御データを、前記印刷制御部及び前記印刷データ通信部に送信する通信制御部を有する請求項1乃至3のいずれか1項に記載のPOS制御システム。
The printing apparatus includes:
4. The POS control system according to claim 1, further comprising a communication control unit configured to transmit the print control data transmitted from the POS terminal to the print control unit and the print data communication unit.
前記印刷装置の前記印刷制御部は、前記印刷部による印刷を行った後、印刷を行ったことを示す通知データを前記通信制御部に送信し、
前記印刷装置の通信制御部は、
前記通知データを受信した後、前記印刷制御データを前記印刷データ通信部に送信する請求項4に記載のPOS制御システム。
The printing control unit of the printing apparatus transmits notification data indicating that printing has been performed to the communication control unit after printing by the printing unit,
The communication control unit of the printing apparatus includes:
The POS control system according to claim 4, wherein, after receiving the notification data, the print control data is transmitted to the print data communication unit.
前記非同期の双方向通信は、WebSocket通信である請求項1乃至5のいずれか1項に記載のPOS制御システム。   The POS control system according to claim 1, wherein the asynchronous two-way communication is WebSocket communication. 外部装置と接続して前記外部装置で送信された印刷制御データを受信する通信接続部と、
前記印刷制御データに基づいて印刷部を制御する印刷制御部と、
前記印刷制御データを非同期の双方向通信で送信する印刷データ通信部と、
を有することを特徴とする印刷装置。
A communication connection unit that connects to an external device and receives print control data transmitted from the external device;
A print control unit that controls a print unit based on the print control data;
A print data communication unit for transmitting the print control data by asynchronous two-way communication;
A printing apparatus comprising:
POS端末で決済処理を行って、前記決済処理に基づく印刷制御データを生成し、
生成された前記印刷制御データを印刷装置に送信し、
前記印刷制御データを受信した前記印刷装置で、前記印刷制御データに基づく印刷を実行し、
前記印刷装置で前記印刷制御データに基づく印刷を実行した後に、前記印刷制御データを非同期の双方向通信で制御装置に送信することを特徴とするPOS制御システムの制御方法。
Perform payment processing at the POS terminal, generate print control data based on the payment processing,
Sending the generated print control data to a printing device;
The printing apparatus that has received the print control data performs printing based on the print control data,
A control method for a POS control system, wherein after executing printing based on the print control data in the printing apparatus, the print control data is transmitted to the control apparatus by asynchronous two-way communication.
JP2014001450A 2014-01-08 2014-01-08 POS control system, printing apparatus, and control method of POS control system Active JP6287215B2 (en)

Priority Applications (5)

Application Number Priority Date Filing Date Title
JP2014001450A JP6287215B2 (en) 2014-01-08 2014-01-08 POS control system, printing apparatus, and control method of POS control system
CN201410836406.3A CN104765579B (en) 2014-01-08 2014-12-29 POS control system, the control method of POS control system and printing equipment
US14/591,490 US9224138B2 (en) 2014-01-08 2015-01-07 POS control system, control method of a POS control system, and printing device
EP15150457.8A EP2894559A1 (en) 2014-01-08 2015-01-08 POS control system, control method of a POS control system, and printing device
US14/851,256 US9406204B2 (en) 2014-01-08 2015-09-11 POS control system, control method of a POS control system, and printing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014001450A JP6287215B2 (en) 2014-01-08 2014-01-08 POS control system, printing apparatus, and control method of POS control system

Publications (3)

Publication Number Publication Date
JP2015130092A true JP2015130092A (en) 2015-07-16
JP2015130092A5 JP2015130092A5 (en) 2016-12-08
JP6287215B2 JP6287215B2 (en) 2018-03-07

Family

ID=53760760

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014001450A Active JP6287215B2 (en) 2014-01-08 2014-01-08 POS control system, printing apparatus, and control method of POS control system

Country Status (1)

Country Link
JP (1) JP6287215B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018096641A1 (en) * 2016-11-25 2018-05-31 三菱重工機械システム株式会社 Client, broker, communication system, communication method and program
EP3660655A1 (en) 2018-11-19 2020-06-03 Seiko Epson Corporation Printer and control method thereof

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004013708A (en) * 2002-06-10 2004-01-15 Seiko Epson Corp Pos system, adapter device, and network system
EP1577807A1 (en) * 2004-03-17 2005-09-21 Seiko Epson Corporation Network system, portable data entry terminal, program, and data output terminal control method
JP2005343028A (en) * 2004-06-03 2005-12-15 Seiko Epson Corp Printing device, printer interface, pos system, program, and printing device control method
WO2006123544A1 (en) * 2005-05-17 2006-11-23 Seiko Epson Corporation Printing system, pos system, connecting device, and method and program for controlling printing system
JP2007207142A (en) * 2006-02-06 2007-08-16 Seiko Epson Corp Network system device driver implementation method, computer device driver implementation method, device driver implementation system, and computer
JP2008282398A (en) * 2007-05-11 2008-11-20 Seiko Epson Corp Method of printing label data based on order data, printer, and order entry system
US20110141494A1 (en) * 2009-12-14 2011-06-16 Yu Liangjian System, apparatus, and method for oriented switch of promotion information
JP2013235518A (en) * 2012-05-10 2013-11-21 Canon Inc Server device, system, and control method thereof
US9224138B2 (en) * 2014-01-08 2015-12-29 Seiko Epson Corporation POS control system, control method of a POS control system, and printing device

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004013708A (en) * 2002-06-10 2004-01-15 Seiko Epson Corp Pos system, adapter device, and network system
EP1577807A1 (en) * 2004-03-17 2005-09-21 Seiko Epson Corporation Network system, portable data entry terminal, program, and data output terminal control method
JP2005267059A (en) * 2004-03-17 2005-09-29 Seiko Epson Corp Network system, portable information input terminal, program and method for controlling information output terminal
JP2005343028A (en) * 2004-06-03 2005-12-15 Seiko Epson Corp Printing device, printer interface, pos system, program, and printing device control method
WO2006123544A1 (en) * 2005-05-17 2006-11-23 Seiko Epson Corporation Printing system, pos system, connecting device, and method and program for controlling printing system
JP2007207142A (en) * 2006-02-06 2007-08-16 Seiko Epson Corp Network system device driver implementation method, computer device driver implementation method, device driver implementation system, and computer
JP2008282398A (en) * 2007-05-11 2008-11-20 Seiko Epson Corp Method of printing label data based on order data, printer, and order entry system
US20110141494A1 (en) * 2009-12-14 2011-06-16 Yu Liangjian System, apparatus, and method for oriented switch of promotion information
JP2013235518A (en) * 2012-05-10 2013-11-21 Canon Inc Server device, system, and control method thereof
US9224138B2 (en) * 2014-01-08 2015-12-29 Seiko Epson Corporation POS control system, control method of a POS control system, and printing device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018096641A1 (en) * 2016-11-25 2018-05-31 三菱重工機械システム株式会社 Client, broker, communication system, communication method and program
KR20190067894A (en) * 2016-11-25 2019-06-17 미츠비시 쥬고 기카이 시스템 가부시키가이샤 Client, broker, communication system, communication method and program
GB2570427A (en) * 2016-11-25 2019-07-24 Mitsubishi Heavy Ind Mach Systems Ltd Client, broker, communication system, communication method and program
KR102209175B1 (en) 2016-11-25 2021-01-28 미츠비시 쥬고 기카이 시스템 가부시키가이샤 Client, broker, communication system, communication method and program
GB2570427B (en) * 2016-11-25 2021-11-17 Mitsubishi Heavy Ind Mach Systems Ltd Client, broker, communication system, communication method, and program
EP3660655A1 (en) 2018-11-19 2020-06-03 Seiko Epson Corporation Printer and control method thereof
US10990861B2 (en) 2018-11-19 2021-04-27 Seiko Epson Corporation Printer communication using formatted printing information and alteration or deletion of formatted printing information

Also Published As

Publication number Publication date
JP6287215B2 (en) 2018-03-07

Similar Documents

Publication Publication Date Title
EP2894559A1 (en) POS control system, control method of a POS control system, and printing device
JP6424438B2 (en) POS system and data processing apparatus
EP2953033B1 (en) Control system and control method for the control system
JP2015130087A (en) Pos control system, and control method of pos control system
JP6287215B2 (en) POS control system, printing apparatus, and control method of POS control system
JP6439368B2 (en) Information processing apparatus, accounting system, and recording apparatus
JP2015130080A (en) Pos control system, and printer
JP2015130086A (en) Pos control system, and printer
JP6260231B2 (en) Print control system and print control method
JP2015135635A (en) Pos system and pos system control method
JP6503905B2 (en) Network system and control method of network system
JP6281248B2 (en) Printing apparatus, printing apparatus control method, and printing control system
JP6578895B2 (en) Network system and control device
JP2015102930A (en) Print control system and print control method
JP6344152B2 (en) Recording apparatus and method for controlling recording apparatus
KR101917547B1 (en) Network system and communication method
JP6578894B2 (en) Network system and control device
JP6252115B2 (en) Print control system
JP6331337B2 (en) Print control system and printing apparatus
JP6268931B2 (en) Print control apparatus and print control system
JP2021121961A (en) Electronic receipt issuing method, information processing device and program
JP2020047302A (en) Electronic receipt issuing method, information processing device and program
JP2016051273A (en) Recording device and control method of the same
JP2015088105A (en) Printer and print control system
JP2015090646A (en) Printing control device and printing control system

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161024

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20161024

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170915

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20171003

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20171201

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20180109

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20180122

R150 Certificate of patent or registration of utility model

Ref document number: 6287215

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150