JP5736851B2 - Sales analysis program using print data, sales information acquisition device, and sales information acquisition method - Google Patents

Sales analysis program using print data, sales information acquisition device, and sales information acquisition method Download PDF

Info

Publication number
JP5736851B2
JP5736851B2 JP2011047757A JP2011047757A JP5736851B2 JP 5736851 B2 JP5736851 B2 JP 5736851B2 JP 2011047757 A JP2011047757 A JP 2011047757A JP 2011047757 A JP2011047757 A JP 2011047757A JP 5736851 B2 JP5736851 B2 JP 5736851B2
Authority
JP
Japan
Prior art keywords
print data
sales information
application
sales
information
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.)
Expired - Fee Related
Application number
JP2011047757A
Other languages
Japanese (ja)
Other versions
JP2012185635A5 (en
JP2012185635A (en
Inventor
明男 高本
明男 高本
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 JP2011047757A priority Critical patent/JP5736851B2/en
Publication of JP2012185635A publication Critical patent/JP2012185635A/en
Publication of JP2012185635A5 publication Critical patent/JP2012185635A5/ja
Application granted granted Critical
Publication of JP5736851B2 publication Critical patent/JP5736851B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、既存アプリケーションから出力される印刷データを用いて売上分析を可能にするためのプログラム等に関し、特に、既存アプリケーションのプログラムを変更することなく、容易に、当該機能を実現できる売上分析用プログラム等に関する。   The present invention relates to a program for enabling sales analysis using print data output from an existing application, and in particular, for sales analysis that can easily realize the function without changing the program of the existing application. It relates to programs.

スーパーマーケットなどの小売販売業においては販売管理システムであるPOSシステムが普及しており、当該システムでは、サーバーとネットワークで接続される複数の端末装置(レジ)が当該装置に備えられるアプリケーションに従って動作し各種の処理を実行する。また、通常、当該端末装置には、それぞれ、プリンターが設けられ、上記アプリケーションの指示によりレシートやクーポンの出力を実行する。   In retail sales businesses such as supermarkets, a POS system, which is a sales management system, has become widespread, and in this system, a plurality of terminal devices (registers) connected to a server via a network operate according to applications provided in the device. Execute the process. Also, normally, each terminal device is provided with a printer, and outputs a receipt or a coupon according to an instruction from the application.

このようなPOSシステムにおいても、導入後の技術向上や業務改善要望に伴って、機能拡張、機能変更の必要が出てくるが、このようなシステムは一般に業務の中枢として常時利用されているものであり、また、他のシステムとも複雑に連携している場合も多いため、そのアプリケーションを改変することは通常容易ではない。また、上記機能拡張としては、売上分析の機能を追加したいという要望がある。   Even in such a POS system, there is a need for function expansion and function change in response to technical improvement and business improvement requests after introduction, but such a system is generally always used as a business center. In many cases, it is also complicatedly linked with other systems, so it is usually not easy to modify the application. Further, as the above function expansion, there is a demand for adding a sales analysis function.

かかる課題については、出力処理系の機能に関し、従来、以下のような提案がなされている。   As for this problem, the following proposals have conventionally been made regarding the functions of the output processing system.

下記特許文献1では、すでに存在するアプリケーションプログラムを修正する必要なしに、従来のモデムに必要とされていたマイクロプロセッサおよびメモリを除去することが可能なパーソナルコンピュータ中でモデム機能を実行する装置について記載されている。   The following Patent Document 1 describes a device that performs a modem function in a personal computer that can remove the microprocessor and memory required for a conventional modem without having to modify an existing application program. Has been.

また、下記特許文献2には、アプリケーションを変更することなく、1つの通信ポートにアクセスすることにより、他の通信ポートに接続されているプリンターへも同時に印刷を実行させることができ、複製印刷を可能にする装置について記載されている。   Further, in Patent Document 2 below, by accessing one communication port without changing the application, it is possible to cause a printer connected to another communication port to execute printing simultaneously. A device is described that enables it.

特開平8−69427号公報JP-A-8-69427 特開2006−338443号公報JP 2006-338443 A

しかしながら、上記特許文献1及び2に記載の内容では、モデム機能、複製印刷機能など出力系の限られた機能を実現するに留まり、他の多彩な要望を実現することはできない。特に、上記売上分析の機能追加をすることはできない。また、上記特許文献2では、OSカーネル層での処理であるため、一般に機能構築(プログラム開発等)が容易ではなく機能も限られてしまうという課題がある。   However, the contents described in Patent Documents 1 and 2 are not limited to realizing limited functions of the output system such as a modem function and a duplication printing function, and cannot satisfy other various demands. In particular, the above sales analysis function cannot be added. Further, since the above-mentioned Patent Document 2 is processing in the OS kernel layer, there is a problem that function construction (program development or the like) is generally not easy and functions are limited.

そこで、本発明の目的は、既存アプリケーションから出力される印刷データを用いて売上分析を可能にするためのプログラムであって、既存アプリケーションのプログラムを変更することなく、容易に、当該機能を実現できる売上分析用プログラム、等を提供することである。   Therefore, an object of the present invention is a program for enabling sales analysis using print data output from an existing application, and can easily realize the function without changing the program of the existing application. To provide a sales analysis program.

上記の目的を達成するために、本発明の一つの側面は、OSカーネル層のオペレーティングシステムによって動作し、アプリケーション層のアプリケーションが印刷データを出力する、通信ポートを備えたコンピューターに、売上情報の取得処理を実行させる売上分析用プログラムが、ルール設定モードの時に、前記OSカーネル層で、前記アプリケーションから出力された印刷データを受信し、前記アプリケーション層で、複数の前記受信した印刷データに基づいて取得ルールを生成する工程を、前記コンピューターに実行させ、前記ルール設定モードでない時に、前記OSカーネル層で、前記アプリケーションから出力された印刷データを受信する工程と、前記アプリケーション層で、前記取得ルールに従って、前記受信された印刷データから、売上情報を抽出する工程と、前記アプリケーション層で、前記抽出された売上情報を、売上分析アプリケーションが処理可能なデータ形式に変換する工程と、前記変換後の売上情報を、前記コンピューターに接続される売上分析アプリケーションに出力する工程と、前記受信された印刷データを、プリンターが接続される前記通信ポートへ出力する工程と、を前記コンピューターに実行させる、ことである。 In order to achieve the above object, one aspect of the present invention is to acquire sales information in a computer having a communication port, which is operated by an operating system of the OS kernel layer and an application layer application outputs print data. When the sales analysis program for executing the process is in the rule setting mode, the OS kernel layer receives the print data output from the application, and the application layer acquires the print data based on the plurality of received print data. a step of generating a rule, is executed by the computer, when not in the rule setting mode, in the OS kernel layer, a step of receiving the print data output from the application, in the application layer, in accordance with the acquisition rule, The received print data A step of extracting sales information, a step of converting the extracted sales information into a data format that can be processed by a sales analysis application in the application layer, and connecting the converted sales information to the computer Outputting to the sales analysis application, and outputting the received print data to the communication port to which a printer is connected.

更にまた、上記の発明において、その好ましい態様は、前記取得ルールは、取得すべき売上情報の内容と所在に関する情報を含む、ことを特徴とする。   Furthermore, in the above-mentioned invention, a preferable aspect thereof is characterized in that the acquisition rule includes information on the contents and location of sales information to be acquired.

上記の目的を達成するために、本発明の別の側面は、OSカーネル層のオペレーティングシステムによって動作し、アプリケーション層のアプリケーションが印刷データを出力する、通信ポートを備えたコンピューターからなる売上情報取得装置が、前記アプリケーションから出力された印刷データを前記OSカーネル層で受信する仮想ポートと、前記アプリケーション層で、複数の前記受信された印刷データに基づいて取得ルールを生成するルール設定部と、前記アプリケーション層で、前記取得ルールに従って、前記受信された印刷データから、売上情報を抽出する売上情報抽出部と、前記アプリケーション層で、前記抽出された売上情報を、売上分析アプリケーションが処理可能なデータ形式に変換するデータ変換部と、前記変換後の売上情報を、前記コンピューターに接続される売上分析アプリケーションに出力する売上情報出力部と、を有し、前記受信された印刷データを、プリンターが接続される前記通信ポートへ出力する、ことである。 In order to achieve the above object, another aspect of the present invention provides a sales information acquisition apparatus comprising a computer having a communication port, which is operated by an operating system of an OS kernel layer and an application layer application outputs print data. A virtual port that receives the print data output from the application at the OS kernel layer, a rule setting unit that generates an acquisition rule based on the plurality of received print data at the application layer, and the application in the layer, in accordance with the acquisition rule, from the received print data, and sales information extractor for extracting sales information, at the application layer, the sales information in which the extracted, the sales analysis application can process data format A data conversion unit to convert, and the converted data On information, anda sales information output unit for outputting the sales analysis applications connected to the computer, the received print data, and outputs to the communication port the printer is connected, is that.

更にまた、上記の発明において、その好ましい態様は、前記取得ルールは、取得すべき売上情報の内容と所在に関する情報を含む、ことを特徴とする。 Furthermore, in the above invention, the preferred embodiment, prior Symbol acquisition rule includes information about the content and location of the sales information to be acquired, characterized in that.

上記の目的を達成するために、本発明の更に別の側面は、OSカーネル層のオペレーティングシステムによって動作し、アプリケーション層のアプリケーションが印刷データを出力する、通信ポートを備えたコンピューターにおける売上情報取得方法が、ルール設定モードの時に、前記コンピューターが、前記OSカーネル層で、前記アプリケーションから出力された印刷データを受信し、前記アプリケーション層で、複数の前記受信した印刷データに基づいて取得ルールを生成する工程を、有し、前記ルール設定モードでない時に、前記コンピューターが、前記アプリケーションから出力された印刷データを前記OSカーネル層で受信する工程と、前記コンピューターが、前記アプリケーション層で、前記取得ルールに従って、前記受信された印刷データから、売上情報を抽出する工程と、前記コンピューターが、前記アプリケーション層で、前記抽出された売上情報を、売上分析アプリケーションが処理可能なデータ形式に変換する工程と、前記コンピューターが、前記変換後の売上情報を、前記コンピューターに接続される売上分析アプリケーションに出力する工程と、前記コンピューターが、前記受信された印刷データを、プリンターが接続される前記通信ポートへ出力する工程と、を有する、ことである。 In order to achieve the above object, still another aspect of the present invention provides a sales information acquisition method in a computer having a communication port, which is operated by an operating system of an OS kernel layer and an application layer application outputs print data. In the rule setting mode, the computer receives the print data output from the application at the OS kernel layer, and generates an acquisition rule based on the plurality of received print data at the application layer. the process has, when not in the rule setting mode, the computer, the steps of receiving the print data output from the application in the OS kernel layer, wherein the computer, in the application layer, in accordance with the acquisition rule, The received Extracting the sales information from the print data, the computer converting the extracted sales information into a data format that can be processed by a sales analysis application in the application layer, and the computer And outputting the converted sales information to a sales analysis application connected to the computer, and the computer outputting the received print data to the communication port to which a printer is connected. That's it.

更にまた、上記の発明において、その好ましい態様は、前記取得ルールは、取得すべき売上情報の内容と所在に関する情報を含む、ことを特徴とする。 Furthermore, in the above invention, the preferred embodiment, prior Symbol acquisition rule includes information about the content and location of the sales information to be acquired, characterized in that.

本発明の更なる目的及び、特徴は、以下に説明する発明の実施の形態から明らかになる。   Further objects and features of the present invention will become apparent from the embodiments of the invention described below.

本発明を適用したPOS端末装置の実施の形態例に係る概略構成図である。It is a schematic block diagram which concerns on the embodiment of the POS terminal device to which this invention is applied. POS端末装置の概略機能構成図である。It is a schematic function block diagram of a POS terminal device. 取得ルールの設定処理の手順を例示したフローチャートである。It is the flowchart which illustrated the procedure of the setting process of an acquisition rule. 売上情報を取得するレシートの一例を示した図である。It is the figure which showed an example of the receipt which acquires sales information. 売上情報の取得処理の手順を例示したフローチャートである。It is the flowchart which illustrated the procedure of the acquisition process of sales information. POSシステムの改良を説明するための図である。It is a figure for demonstrating the improvement of a POS system.

以下、図面を参照して本発明の実施の形態例を説明する。しかしながら、かかる実施の形態例が、本発明の技術的範囲を限定するものではない。なお、図において、同一又は類似のものには同一の参照番号又は参照記号を付して説明する。   Embodiments of the present invention will be described below with reference to the drawings. However, such an embodiment does not limit the technical scope of the present invention. In the drawings, the same or similar elements are denoted by the same reference numerals or reference symbols.

図1は、本発明を適用したPOS端末装置の実施の形態例に係る概略構成図である。また、図2は、当該POS端末装置の概略機能構成図である。図1及び図2に示すPOS端末装置2(売上情報取得装置)が本発明を適用した装置であり、当該装置では、POSアプリケーション201から出力される印刷データ(例えば、レシートのデータ)を、通信ポート209に出力される前にOSカーネル層230の仮想ポート203で受信する。そして、受信したデータをアプリケーション層220の売上情報抽出部204で受け取り、予め定められた取得ルールに従って、その印刷データの中から売上情報を抽出する。その後、抽出された売上情報は、データ変換部205によって売上分析アプリケーション5が処理可能な標準フォーマットに変換され、売上情報出力部206から当該アプリケーションに出力される。一方、印刷データは通信ポート209に出力されプリンター3から印刷物が出力される。   FIG. 1 is a schematic configuration diagram according to an embodiment of a POS terminal device to which the present invention is applied. FIG. 2 is a schematic functional configuration diagram of the POS terminal apparatus. A POS terminal apparatus 2 (sales information acquisition apparatus) shown in FIGS. 1 and 2 is an apparatus to which the present invention is applied. In the apparatus, print data (for example, receipt data) output from the POS application 201 is communicated. The data is received by the virtual port 203 of the OS kernel layer 230 before being output to the port 209. The received data is received by the sales information extraction unit 204 of the application layer 220, and sales information is extracted from the print data according to a predetermined acquisition rule. Thereafter, the extracted sales information is converted into a standard format that can be processed by the sales analysis application 5 by the data conversion unit 205, and is output from the sales information output unit 206 to the application. On the other hand, the print data is output to the communication port 209 and the printed matter is output from the printer 3.

また、当該POS端末装置2には、上述した売上情報の取得ルールの生成機能が備えられる。当該生成機能によれば、すなわち、ルール設定部208は、印刷物、例えばレシートの複数の印刷データを比較し、印刷内容について、オブジェクト毎に固定部又は可変部を判断する。その後、各可変部について、その印刷内容や配置位置等からどのような売上情報であるかを判定し、その結果に基づいて、当該印刷物のどこにどのような売上情報が含まれるかを取得ルールとして記憶しておく。   Further, the POS terminal device 2 is provided with the above-described sales information acquisition rule generation function. According to the generation function, the rule setting unit 208 compares a plurality of print data of a printed matter, for example, a receipt, and determines whether the print content is a fixed portion or a variable portion for each object. After that, for each variable part, determine what sales information it is from its print contents and location, etc., and based on the result, what kind of sales information is included in the printed matter as an acquisition rule Remember.

本POS端末装置2では、かかる処理を実行することにより、既存アプリケーションのプログラムを変更することなく、容易に、売上分析の機能追加を可能にする。   In the POS terminal device 2, by executing such processing, it is possible to easily add a function of sales analysis without changing the program of the existing application.

本実施の形態例では、販売店舗などで用いられるPOSシステムを想定しており、図1に示すように、POSサーバー1にネットワーク4を介して複数のPOS端末装置2が接続される構成をしている。POSサーバー1は、コンピューターシステムで構成され、上記複数のPOS端末装置2の管理とそれらのPOS端末装置2から取得される各種データの集計、管理等の処理を実行する。   In this embodiment, a POS system used in a store or the like is assumed, and a plurality of POS terminal devices 2 are connected to a POS server 1 via a network 4 as shown in FIG. ing. The POS server 1 is constituted by a computer system, and executes processing such as management of the plurality of POS terminal devices 2 and aggregation and management of various data acquired from the POS terminal devices 2.

POS端末装置2は各レジに設置され、それぞれ、プリンター3と接続される。プリンター3は、POS端末装置2から出力される印刷データに従って、レシート等を出力する。従って、POS端末装置2はプリンター3のホスト装置と位置づけられる。   The POS terminal device 2 is installed at each cash register and is connected to the printer 3. The printer 3 outputs a receipt or the like according to the print data output from the POS terminal device 2. Therefore, the POS terminal device 2 is positioned as the host device of the printer 3.

各POS端末装置2は、図1に示すように、POS端末本体21、ディスプレイ22、キーボード・マウス23、バーコードリーダー24、及びカードリーダー25等を備える。ディスプレイ22は、顧客に商品の金額等を表示し、キーボード・マウス23は、価格や商品コードなどの商品情報、性別、年代などの顧客情報をオペレーターが入力するために用いられる。また、バーコードリーダー24は、商品に付されたバーコードを読み取って商品情報を取得し、カードリーダー25は、各種カードに記憶された情報を読み取って、清算に必要な情報などを取得する。   As shown in FIG. 1, each POS terminal device 2 includes a POS terminal main body 21, a display 22, a keyboard / mouse 23, a barcode reader 24, a card reader 25, and the like. The display 22 displays the price of the product to the customer, and the keyboard / mouse 23 is used by the operator to input product information such as price and product code, and customer information such as sex and age. Further, the barcode reader 24 reads the barcode attached to the product to acquire product information, and the card reader 25 reads the information stored in various cards to acquire information necessary for settlement.

POS端末本体21は、上述したキーボード・マウス23、バーコードリーダー24、及びカードリーダー25から取得される情報に基づいて、レシートやクーポンに印刷する情報を生成して、プリンター3へ出力する。当該POS端末本体21は、コンピューターで構成され、図示していないが、CPU、RAM、ROM、HDDなどを備えている。後述するPOSアプリケーション201のプログラムや売上情報取得処理等のためのプログラムなどは、上記ROMに記憶され、それらのプログラムに従って上記CPUが動作することにより各処理が実行される。   The POS terminal main body 21 generates information to be printed on a receipt or a coupon based on information acquired from the keyboard / mouse 23, the barcode reader 24, and the card reader 25 described above, and outputs the information to the printer 3. The POS terminal main body 21 is configured by a computer and includes a CPU, a RAM, a ROM, an HDD and the like (not shown). A program for the POS application 201 described later, a program for sales information acquisition processing, and the like are stored in the ROM, and each process is executed by the CPU operating in accordance with these programs.

また、POS端末装置2は、図2に示すような機能構成となっている。POSアプリケーション201は、上述したレシート等に印刷する情報を生成して出力する処理などを行うが、売上を分析する機能、分析するための機能については、備えていないか機能が乏しいものとする。また、上記生成して出力される印刷データは、そのままプリンター3へ出力できる形式のデータ、あるいは、プリンター3用ドライバー202に渡す形式のデータである。前者は、テキストだけの印刷など簡単な印刷データの場合に生成される。   Further, the POS terminal device 2 has a functional configuration as shown in FIG. The POS application 201 performs processing for generating and outputting information to be printed on the receipt and the like described above. However, the POS application 201 does not have a function for analyzing sales or a function for analyzing sales or has a poor function. The generated and output print data is data in a format that can be output to the printer 3 as it is, or data in a format that is passed to the printer 3 driver 202. The former is generated in the case of simple print data such as printing of text only.

また、プリンター3用ドライバー202は、プリンター3用のプリンタードライバーであり、POSアプリケーション201から出力されたデータを、プリンター3の機種(デバイス)に依存したコマンドによる、プリンター3が受信して印刷可能な印刷データとして出力する。   The printer 3 driver 202 is a printer driver for the printer 3, and the data output from the POS application 201 can be received and printed by the printer 3 using a command depending on the model (device) of the printer 3. Output as print data.

なお、POSアプリケーション201とプリンター3用ドライバー202は、図2に示すように、コンピューターのオペレーティングシステム(OS)に基づきその上でプログラムが各処理を実行するアプリケーション層220に位置する。また、両者は、それぞれの処理内容を指示する上記ROMに格納されたプログラムと当該プログラムに従って処理を実行する上記CPU等によって構成される。また、POSアプリケーション201とプリンター3用ドライバー202は、本発明を適用する前の従来装置で用いられていたものがそのまま使用される。   As shown in FIG. 2, the POS application 201 and the printer 3 driver 202 are located in an application layer 220 on which a program executes each process based on an operating system (OS) of a computer. Both are constituted by a program stored in the ROM for instructing each processing content and the CPU for executing processing according to the program. As the POS application 201 and the printer 3 driver 202, those used in the conventional apparatus before applying the present invention are used as they are.

次に、仮想ポート203は、POSアプリケーション201又はプリンター3用ドライバー202から出力された印刷データを、通信ポート209が受け取る前に上記オペレーティングシステムが位置するOSカーネル層230で受け取る部分である。そして、仮想ポート203は、取得した印刷データを売上情報抽出部204へ引き渡す。   Next, the virtual port 203 is a part that receives print data output from the POS application 201 or the printer 3 driver 202 by the OS kernel layer 230 in which the operating system is located before the communication port 209 receives the print data. Then, the virtual port 203 delivers the acquired print data to the sales information extraction unit 204.

次に、売上情報抽出部204、データ変換部205、売上情報出力部206、ルール設定部208、及びデータ格納部207は、印刷データから売上情報を取得する処理等を行う部分であり、これら各部の処理により、上記POSアプリケーション201から出力された印刷データを用いて、POSアプリケーション201が備えていない売上分析の処理が可能になる。   Next, a sales information extraction unit 204, a data conversion unit 205, a sales information output unit 206, a rule setting unit 208, and a data storage unit 207 are units for performing processing for acquiring sales information from print data. By this processing, it becomes possible to perform sales analysis processing that the POS application 201 does not have, using the print data output from the POS application 201.

売上情報抽出部204は、転送された上記印刷データから売上情報を抽出する部分であり、その処理の際には、データ格納部207に格納される取得ルールを用いる。また、当該抽出処理の後は、印刷データを、そこに設定されている通信ポート209に向けて出力する。なお、売上情報抽出部204は、POSアプリケーション201又はプリンター3用ドライバー202から出力された印刷データを解釈可能な機能を備えている。   The sales information extraction unit 204 is a part that extracts sales information from the transferred print data, and uses an acquisition rule stored in the data storage unit 207 in the process. Further, after the extraction process, the print data is output toward the communication port 209 set therein. The sales information extraction unit 204 has a function capable of interpreting the print data output from the POS application 201 or the printer 3 driver 202.

また、データ変換部205は、上記抽出された売上情報のデータ形式を変換する部分であり、具体的には、売上情報抽出部204が処理したデータ形式を、XML(eXtensible Markup Language)、CSV(Comma−Separated Value)などの一般的な売上分析アプリケーション(ソフトウェア)が処理可能な標準フォーマットに変換する。   The data conversion unit 205 is a part that converts the data format of the extracted sales information. Specifically, the data format processed by the sales information extraction unit 204 is converted into XML (extensible Markup Language), CSV (CSV). It is converted into a standard format that can be processed by a general sales analysis application (software) such as Comma-Separated Value.

次に、売上情報出力部206は、上記フォーマット変換後の売上情報を所定の売上分析アプリケーション5に出力する部分である。ここでは、図2に示されるように、ネットワーク4を介して出力され、売上分析アプリケーション5は、上述した一般的な売上分析アプリケーションであり、ネットワーク4を介して通信可能なコンピューターに備えられている。   Next, the sales information output unit 206 is a part that outputs the sales information after the format conversion to a predetermined sales analysis application 5. Here, as shown in FIG. 2, the sales analysis application 5 is output via the network 4, and the sales analysis application 5 is a general sales analysis application described above, and is provided in a computer that can communicate via the network 4. .

次に、ルール設定部208は、上述した取得ルールを生成してデータ格納部207に設定する部分である。当該ルール設定処理は、印刷データからの売上情報取得処理を行う前に予め実行される。なお、その具体的な処理内容は後述する。   Next, the rule setting unit 208 is a part that generates the acquisition rule described above and sets it in the data storage unit 207. The rule setting process is executed in advance before performing the sales information acquisition process from the print data. The specific processing content will be described later.

以上の、仮想ポート203、売上情報抽出部204、データ変換部205、売上情報出力部206、及び、ルール設定部208は、それぞれ、上記ROMに格納され各部が行う処理を指示するプログラムと当該プログラムに従って処理を実行する上記CPU等によって構成される。また、これらプログラムが本発明の売上分析用プログラムに相当する。   The virtual port 203, the sales information extraction unit 204, the data conversion unit 205, the sales information output unit 206, and the rule setting unit 208 are stored in the ROM and instructed for processing performed by each unit and the program, respectively. The CPU is configured to execute processing according to These programs correspond to the sales analysis program of the present invention.

データ格納部207は、上記取得ルール等、売上情報抽出部204が使用する情報を記憶する部分である。なお、当該データ格納部207は上記HDD等で構成される。   The data storage unit 207 is a part that stores information used by the sales information extraction unit 204 such as the acquisition rule. The data storage unit 207 is composed of the HDD or the like.

次に、POS端末装置2には、物理層240に通信ポート209が備えられ、プリンター3に接続される。プリンター3は、本発明を適用する前の従来システムにおけるプリンターがそのまま用いられる。なお、通信ポート209は、シリアル通信のCOM通信ポートやUSB通信を行うUSB通信ポートなどである。   Next, the POS terminal device 2 includes a communication port 209 in the physical layer 240 and is connected to the printer 3. As the printer 3, a printer in a conventional system before applying the present invention is used as it is. The communication port 209 is a COM communication port for serial communication, a USB communication port for performing USB communication, or the like.

以上説明したような構成を有する本POS端末装置2では、上述した売上情報の取得ルールの生成及びそれを用いた印刷物出力時の売上情報の取得処理に特徴があり、以下、その具体的な処理手順について説明する。   The present POS terminal device 2 having the above-described configuration is characterized in the generation of sales information acquisition rules described above and the sales information acquisition processing at the time of printed matter output using the rules. The procedure will be described.

まず、ルール設定部208による取得ルールの設定処理について説明する。図3は、当該設定処理の手順を例示したフローチャートである。ルール設定をする場合には、まず、POS端末装置2のユーザーがその旨の指示をディスプレイ22、キーボード・マウス23を用いて行い、その指示がルール設定部208に受信される(ステップS1)。すると、ルール設定部208は、売上情報抽出部204にルール設定のモードであることを通知する。   First, the acquisition rule setting process by the rule setting unit 208 will be described. FIG. 3 is a flowchart illustrating the procedure of the setting process. When setting a rule, first, the user of the POS terminal apparatus 2 gives an instruction to that effect using the display 22 and the keyboard / mouse 23, and the instruction is received by the rule setting unit 208 (step S1). Then, the rule setting unit 208 notifies the sales information extraction unit 204 that it is the rule setting mode.

その後、ルール設定部208は、上記ユーザーに売上情報を取得する印刷物の印刷データをPOSアプリケーション201から出力させるように、ディスプレイ22等を用いて指示する。これを受けて、ユーザーは、当該印刷物を通常出力する場合と同様の操作を実施して、印刷データを出力させる。   Thereafter, the rule setting unit 208 instructs the user to use the display 22 or the like to cause the POS application 201 to output print data of a printed matter for which sales information is acquired. In response to this, the user performs the same operation as that for normal output of the printed matter, and outputs print data.

なお、ここでは、上記印刷物をレシートとし、レシートの印刷データから売上情報を取得する場合について説明する。図4は、当該レシートの一例を示した図である。   Here, a case will be described in which the printed matter is a receipt, and sales information is acquired from print data of the receipt. FIG. 4 shows an example of the receipt.

上記出力された印刷データは、通信ポート209へ向けてPOSアプリケーション201又はプリンター3用ドライバー202から発せられる。当該印刷データは、通信ポート209で受け取られる前に仮想ポート203で受信され、その後、売上情報抽出部204へ転送される。なお、上記仮想ポート203による受信の仕組みは後述する。   The output print data is issued from the POS application 201 or the printer 3 driver 202 toward the communication port 209. The print data is received at the virtual port 203 before being received at the communication port 209, and then transferred to the sales information extraction unit 204. The mechanism of reception by the virtual port 203 will be described later.

次に、売上情報抽出部204は、上述したように、ルール設定のモードであることを通知されているので、転送された印刷データをルール設定部208へ送信する。売上情報抽出部204は、当該印刷データに対してこれ以上の処理を実行しない。   Next, since the sales information extraction unit 204 is notified of the rule setting mode as described above, it transmits the transferred print data to the rule setting unit 208. The sales information extraction unit 204 does not perform any further processing on the print data.

ルール設定部208は、送信された印刷データを受信し(ステップS2)、当該印刷データに含まれる印刷内容をオブジェクト化する(ステップS3)。ここでは、印刷物上(レシート上)で改行やスペースによって区切られない連続した文字列、1画像(イメージ)、及び1図形(グラフィックス)をオブジェクトとし、上記印刷データの内容をこのオブジェクトに分割する処理を実行する。   The rule setting unit 208 receives the transmitted print data (step S2), and converts the print contents included in the print data into an object (step S3). Here, a continuous character string, one image (image), and one graphic (graphics) that are not separated by line breaks or spaces on the printed material (on the receipt) are objects, and the contents of the print data are divided into these objects. Execute the process.

図4に示す例では、レシート内の矩形で囲われた各部分がオブジェクトであり、この例では、16のオブジェクトに分割されている。当該オブジェクト化の処理は、ルール設定部208が、印刷データの各コマンドを解釈し、レシートの印刷内容について上記オブジェクトの定義に従って1つずつオブジェクトを抽出していく処理によって行なわれる。抽出された各オブジェクトは、その印刷内容及び印刷位置の情報と共に上記RAMに保持される。   In the example shown in FIG. 4, each part enclosed by the rectangle in the receipt is an object, and in this example, it is divided into 16 objects. The object setting process is performed by the rule setting unit 208 interpreting each command of the print data and extracting objects one by one according to the object definition for the print contents of the receipt. Each extracted object is held in the RAM together with the print contents and print position information.

次に、ルール設定部208は、同じ形式のレシートについて次の印刷データを出力するように指示を出し、上述の場合と同様のユーザー操作及び印刷データの出力・受信・転送がなされて、次の印刷データを受信する(ステップS4)。   Next, the rule setting unit 208 issues an instruction to output the next print data for the receipt of the same format, and the user operation and the output / reception / transfer of the print data are performed in the same manner as described above. Print data is received (step S4).

ルール設定部208は、受信した印刷データについてステップS3と同様のオブジェクト化を実行し(ステップS5)、上記保持したオブジェクトと当該抽出したオブジェクトとの比較を行う(ステップS6)。具体的には、上記保持した各オブジェクトの印刷内容を、当該抽出したオブジェクトの印刷内容と、順次、比較する。   The rule setting unit 208 converts the received print data into an object similar to step S3 (step S5), and compares the held object with the extracted object (step S6). Specifically, the held print contents of each object are sequentially compared with the extracted print contents of the object.

その結果、同じ印刷内容のオブジェクトが当該抽出したオブジェクトの中に存在すれば、すなわち、同じオブジェクトが上記次の印刷データの中に存在すれば、当該オブジェクトの出現回数を1つカウントアップする(ステップS7)。ここでは、出現回数が1となる。また、同じ印刷内容のオブジェクトが存在しなければ出現回数のカウントアップを行わない。   As a result, if an object with the same print content exists in the extracted object, that is, if the same object exists in the next print data, the number of appearances of the object is counted up by one (step S7). Here, the number of appearances is 1. If there is no object with the same print content, the appearance count is not counted up.

図4に示す例では、「エプソン松本南店」(FO1)は、店舗名であり、どのレシートにも印刷されるので、ここで出現回数がカウントアップされる。また、「野菜」(VO7)は、購入された商品名であり、毎回出現するとは限らないので、出現回数がカウントアップされない可能性が高い。   In the example shown in FIG. 4, “Epson Matsumoto Minami Store” (FO1) is the store name and is printed on every receipt, so the number of appearances is counted up here. In addition, “vegetable” (VO7) is a purchased product name and does not always appear every time, so there is a high possibility that the number of appearances will not be counted up.

上記保持した全てのオブジェクトについて当該処理が終了すると、当該他の印刷データとの比較処理(ステップS4−S7)が所定回数(枚数)実行されたかをチェックし(ステップS8)、所定回数実行されていなければ(ステップS8のNo)、ステップS4からの処理を実行する。所定回数(枚数)は、例えば、10回(枚)とすることができる。   When the processing is completed for all the held objects, it is checked whether the comparison processing (steps S4 to S7) with the other print data has been executed a predetermined number of times (number of sheets) (step S8), and the predetermined number of times has been executed. If not (No in step S8), the processing from step S4 is executed. The predetermined number of times (number of sheets) can be, for example, 10 times (sheets).

所定回数分の処理が実行されれば(ステップS8のYes)、ルール設定部208は、上記保持した各オブジェクトについて、固定部であるか又は可変部であるかの判断を行う(ステップS9)。具体的には、この時点での各オブジェクトの上記出現回数によって判断する。なお、固定部とは、各印刷データによって印刷内容が変化しない固定内容の部分(オブジェクト)であり、店舗名や定型句などが含まれる。また、可変部とは、各印刷データによって印刷内容が変化し得る部分(オブジェクト)であり、購入された商品名やその金額などが含まれる。   When the predetermined number of times of processing is executed (Yes in step S8), the rule setting unit 208 determines whether each of the held objects is a fixed unit or a variable unit (step S9). Specifically, the determination is made based on the number of appearances of each object at this time. The fixed part is a fixed content part (object) whose print content does not change depending on each print data, and includes a store name, a fixed phrase, and the like. The variable part is a part (object) whose print contents can be changed by each print data, and includes the name of a purchased product and its price.

上記判断の一例としては、出現回数が上記所定回数(枚数)(例えば、10)と一致するオブジェクトは固定部と判断し、出現回数が上記所定回数(枚数)よりも少なければ可変部と判断する。   As an example of the determination, an object whose number of appearances matches the predetermined number (number) (for example, 10) is determined as a fixed part, and if the number of appearances is less than the predetermined number (number), it is determined as a variable part. .

その後、ルール設定部208は、上記保持したオブジェクトの中で売上情報として取得すべきものを決定する(ステップS10)。ルール設定部208は、基本的には、上記可変部と判断したオブジェクトは売上情報を含んでいると判断する。そして、ルール設定部208は、予め定められた規則に従って、可変部の売上情報を把握し、取得すべきと決定していく。例えば、「担当」という印刷内容の固定部の次に印刷される可変部の印刷内容は担当者の情報であるという規則に従って、「担当」という固定部を探し、その次の可変部が担当者を表していると把握し、それを取得すべきとする。また、例えば、「領収書」という印刷内容の固定部の次行から、「合計」という印刷内容の固定部の前行までに印刷される可変部であって、印刷内容が文字であるものは購入した商品の名称であり、その商品名と同じ行にあり印刷内容が「\」の後に数字であるものは、その価格であるという規
則に従って、商品名とその価格の情報を把握し、それらの情報を取得すべきと決定する。
Thereafter, the rule setting unit 208 determines what should be acquired as sales information among the held objects (step S10). The rule setting unit 208 basically determines that the object determined to be the variable unit includes sales information. Then, the rule setting unit 208 grasps the sales information of the variable unit according to a predetermined rule and determines that it should be acquired. For example, according to the rule that the print contents of the variable part that is printed next to the fixed part of the print content “in charge” is the information of the person in charge, the fixed part “in charge” is searched, and the next variable part is the person in charge It is assumed that it represents and should be acquired. Also, for example, a variable part that is printed from the next line of the fixed part of the print content “receipt” to the previous line of the fixed part of the print content “total”, where the print content is a character According to the rule that the name of the purchased product, which is on the same line as the product name, and the printed content is a number after “\” is the price, the product name and the price information are ascertained It is determined that information should be obtained.

図4に示す例では、前者の規則にしたって、「担当」という固定部オブジェクトFO4を探し、その次の「米山」という可変部オブジェクトVO5を担当者情報と把握し、その情報を取得すべき情報として決定する。また、後者の規則に従って、「領収書」FO6と「合計」FO13が検索され、その間の各行において、文字オブジェクト(VO7、9、11)と数字オブジェクト(VO8、10、12)がそれぞれ商品名とその価格であると把握し、取得すべき情報と決定する。   In the example shown in FIG. 4, in accordance with the former rule, the fixed part object FO4 called “in charge” is searched, the next variable part object VO5 called “Yoneyama” is grasped as the person in charge information, and the information to be acquired Determine as. Further, according to the latter rule, “receipt” FO6 and “total” FO13 are searched, and in each line between them, a character object (VO7, 9, 11) and a number object (VO8, 10, 12) are respectively a product name and We grasp that it is the price and decide it as information to be acquired.

同様の規則に従って、「合計」という固定部オブジェクトFO13を探し、その次の「\600」という可変部オブジェクトVO14を合計金額の情報と把握し、その情報を取得すべき情報として決定する。また、可変部オブジェクト「2010/05/20/12:10」VO15は、印刷内容が日時を表す形式であることから日時情報であると把握し、その情報を取得すべきと決定する。   According to the same rule, the fixed part object FO13 “total” is searched, the next variable part object VO14 “¥ 600” is grasped as information of the total amount, and the information is determined as information to be acquired. Further, the variable part object “2010/05/20/12: 10” VO15 recognizes that the print content is the date and time information because it is in a format representing the date and time, and determines that the information should be acquired.

次に、ルール設定部208は、上記決定した売上情報を取得するための取得ルールを生成してデータ格納部207に記憶する(ステップS11)。具体的には、レシート上のどこに位置するオブジェクトの印刷内容を、どのような情報として取得すべきかを示すルールを生成して、記憶する。すなわち、取得ルールには、取得すべき情報を含む各オブジェクトの所在及び情報項目が示される。この取得ルールは、上記ステップS3において保持したオブジェクトの情報及び上記ステップS10において把握した売上情報の内容に従って生成される。この際、オブジェクトの所在情報については、印刷順でそのオブジェクトの前に、固定部と印刷領域が一定範囲内の可変部のみがある場合には、上記保持している位置情報をそのまま使用し、すなわち、絶対位置情報としてもち、そうでない場合には、相対位置情報としてもつ。   Next, the rule setting unit 208 generates an acquisition rule for acquiring the determined sales information and stores it in the data storage unit 207 (step S11). Specifically, a rule indicating what information should be acquired as the print content of the object located on the receipt is generated and stored. That is, the acquisition rule indicates the location of each object including information to be acquired and information items. This acquisition rule is generated in accordance with the object information held in step S3 and the sales information grasped in step S10. At this time, for the location information of the object, if there is only a fixed part and a variable part whose print area is within a certain range in front of the object in the printing order, the held position information is used as it is, That is, it has absolute position information, otherwise it has relative position information.

図4の例では、まず、上述した担当者情報を含むオブジェクト(VO5)の情報を取得する必要があり、その情報の前に、固定部のみしかないので、オブジェクトVO5の絶対位置にあるオブジェクトの内容を担当者情報として取得すべきである、というルールが生成されて記憶される。   In the example of FIG. 4, first, it is necessary to acquire information on the object (VO5) including the above-mentioned person-in-charge information. Since there is only a fixed part before the information, the object at the absolute position of the object VO5 is displayed. A rule that the contents should be acquired as person-in-charge information is generated and stored.

また、上述した商品名と価格の情報については、その先頭のオブジェクトVO7の前に固定部と印刷領域が一定範囲内の可変部のみしかないので、オブジェクトVO7の絶対位置から、順次、各2つのオブジェクトの内容を、商品名とその価格の情報として、「合計」(FO13)というオブジェクトの前まで取得すべきである、というルールが生成されて記憶される。   In addition, with respect to the product name and price information described above, there are only a fixed part and a variable part with a print area within a certain range in front of the leading object VO7. A rule is generated and stored that the contents of the object should be acquired before the object of “total” (FO13) as information on the product name and its price.

また、「合計」(FO13)というオブジェクトの次に来るオブジェクト(VO14)の内容を合計金額の情報として取得すべきである、というルールが生成されて記憶される。   Further, a rule is generated and stored that the contents of the object (VO14) following the object “total” (FO13) should be acquired as information on the total amount.

さらに、その次のオブジェクト(VO15)を日時情報として取得すべきである、というルールが生成されて記憶される。   Furthermore, a rule that the next object (VO15) should be acquired as date / time information is generated and stored.

このように図4の例では、4つのルールが取得ルールとして記憶されることになる。   Thus, in the example of FIG. 4, four rules are stored as acquisition rules.

以上説明したように、取得ルールが設定される。なお、上述の内容では、所定枚数分の印刷データの指示及びユーザーによる操作がなされるが、最初に所定枚数分の印刷データを一辺に出力させるようにしても良い。この場合には、ルール設定部208は、所定枚数分の印刷データを上記RAMに保持しておく。また、これら印刷データにおいては、上述のとおり、「担当」の情報を可変部として判断したいので、意識的に担当者を変更させた印刷データを生成して出力するようにすることが好ましい。   As described above, the acquisition rule is set. In the above description, the print data for the predetermined number of sheets is instructed and the user performs an operation. However, the print data for the predetermined number of sheets may be first output to one side. In this case, the rule setting unit 208 holds a predetermined number of print data in the RAM. Further, in these print data, as described above, since it is desired to determine the “in charge” information as a variable part, it is preferable to generate and output print data in which the person in charge is consciously changed.

次に、上記設定した取得ルールを用いた売上情報の取得時の処理について説明する。図5は、売上情報の取得処理の手順を例示したフローチャートである。   Next, processing at the time of acquiring sales information using the set acquisition rule will be described. FIG. 5 is a flowchart illustrating the procedure of the sales information acquisition process.

まず、前述の通り、POSアプリケーション201から直接、又は、プリンター3用ドライバー202を介して、印刷データが出力される(ステップS21)。ここでは、当該印刷データは、プリンター3から出力するレシートの印刷データであり、従って、出力先の通信ポートには通信ポート209が指定され、プリンター3に依存したコマンドで表現されている。   First, as described above, print data is output directly from the POS application 201 or via the printer 3 driver 202 (step S21). Here, the print data is the print data of a receipt output from the printer 3. Therefore, the communication port 209 is designated as the output destination communication port, and is expressed by a command depending on the printer 3.

次に、出力された印刷データは、指定された通信ポート209に届く前に仮想ポート203によって受け取られる(ステップS22)。かかる処理は、いずれの通信ポート209へ向けたデータも、まず、仮想ポート203が受け取るように、レジストリーの(優先度の)設定を変更しておくことで実現され、かかる設定変更はOSの起動時に実行される。その後、受け取られた印刷データは、仮想ポート203からアプリケーション層220の売上情報抽出部204に送信される(ステップS22)。   Next, the output print data is received by the virtual port 203 before reaching the designated communication port 209 (step S22). This processing is realized by changing the (priority) setting of the registry so that the virtual port 203 receives data for any communication port 209, and the setting change is started by the OS. Sometimes executed. Thereafter, the received print data is transmitted from the virtual port 203 to the sales information extraction unit 204 of the application layer 220 (step S22).

売上情報抽出部204は、送信された印刷データから印刷情報の抽出を行う(ステップS23)。なお、売上情報抽出部204は、この実際の印刷データを出力する時点では、ルール設定部208からの上述した通知はないので、ルール設定モードではないと判断し、自ら情報抽出の処理を開始する。   The sales information extraction unit 204 extracts print information from the transmitted print data (step S23). Note that the sales information extraction unit 204 determines that it is not in the rule setting mode because it does not receive the above-mentioned notification from the rule setting unit 208 at the time of outputting the actual print data, and starts the information extraction process itself. .

具体的には、上記データ格納部207に記憶された取得ルールに従って、上記送信された印刷データの、当該ルールで指示される位置にある情報を、当該ルールで定められた情報内容として抽出する。   Specifically, in accordance with the acquisition rule stored in the data storage unit 207, information at the position indicated by the rule in the transmitted print data is extracted as information content defined by the rule.

図4に示した例では、上述したとおりの4つのルールが記憶されているので、まず、オブジェクトVO5の開始位置からスペース又は改行コマンドまでの文字列が担当者情報として抽出される。次に、オブジェクトVO7の開始位置から、スペース又は改行コマンドで区切られる間の情報が、「合計」(FO13)という文字列が現れるまで、商品名の情報、その価格情報の順番で、これらの情報として抽出される。さらに、「合計」(FO13)という文字列とそれに続くスペース又は改行コマンドの直後から、スペース又は改行コマンドの間の情報が、合計金額情報として抽出される。最後に、その後のスペース又は改行コマンドの直後から、スペース又は改行コマンドの間の情報が、日時情報として抽出される。   In the example shown in FIG. 4, since the four rules as described above are stored, first, a character string from the start position of the object VO5 to a space or a line feed command is extracted as person-in-charge information. Next, the information between the start position of the object VO7 and the information separated by the space or line feed command until the character string “total” (FO13) appears, in order of the product name information and the price information, these information Extracted as Further, immediately after the character string “total” (FO13) and the subsequent space or line feed command, information between the space or line feed command is extracted as total amount information. Finally, information immediately after the subsequent space or line feed command is extracted as date and time information.

このようにして、出力されたレシートの印刷データから、当該売り上げについて、担当者、購入された商品及びその価格、合計金額、及び日時の情報が抽出される。   In this manner, information on the person in charge, the purchased product and its price, the total amount, and the date and time are extracted from the output print data of the receipt.

次に、抽出された情報は、データ変換部205に渡され、データ変換部205は、当該抽出された売上情報のデータ形式を、XML、CSVなどの一般的な売上分析アプリケーション(ソフトウェア)が処理可能な標準フォーマットに変換する(ステップS24)。ここでは、売上分析アプリケーション5が処理可能なフォーマットに変換する。   Next, the extracted information is passed to the data conversion unit 205, and the data conversion unit 205 processes the data format of the extracted sales information by a general sales analysis application (software) such as XML or CSV. Conversion into a possible standard format (step S24). Here, the sales analysis application 5 converts it into a format that can be processed.

当該変換後の売上情報は、売上情報出力部206に渡され、売上情報出力部206は、当該売上情報をネットワーク4を介して売上分析アプリケーション5に送信する(ステップS25)。売上分析アプリケーション5は、当該売上情報を受信して各種の売上分析処理を実行する。なお、当該売上分析アプリケーション5への出力は、各レシートの出力毎に行わなくてもよく、すなわち、売上情報出力部206が売上情報を受け取る度に行わなくてもよく、各レシートの情報を上記RAM又はHDDに保持しておき、所定のタイミングで、例えば、毎日閉店時に、溜まった情報を一辺に出力するようにしても良い。   The converted sales information is passed to the sales information output unit 206, and the sales information output unit 206 transmits the sales information to the sales analysis application 5 via the network 4 (step S25). The sales analysis application 5 receives the sales information and executes various sales analysis processes. Note that the output to the sales analysis application 5 does not have to be performed every time each receipt is output, that is, the sales information output unit 206 does not have to be performed every time the sales information is received. The information stored in the RAM or HDD may be output to one side at a predetermined timing, for example, when the store is closed every day.

次に、前記仮想ポート203から転送された印刷データを、売上情報抽出部204は、当該データに設定されている通信ポート209へ向けて出力する(ステップS26)。なお、当該処理は、売上情報抽出部204が当該データから売上情報を抽出した直後、あるいは、売上情報抽出部204が受け取った印刷データをコピーして保持する場合には、当該コピーの直後に、行われることが好ましい。特に、上記売上情報の出力(S25)を直ぐに行わない場合には、当該出力を待たずに実行される。   Next, the sales information extraction unit 204 outputs the print data transferred from the virtual port 203 toward the communication port 209 set in the data (step S26). Note that the processing is performed immediately after the sales information extraction unit 204 extracts sales information from the data, or when the print data received by the sales information extraction unit 204 is copied and held, immediately after the copy, Preferably, it is done. In particular, when the sales information is not immediately output (S25), it is executed without waiting for the output.

その後、印刷データは通信ポート209を介してプリンター3へ送信され、プリンター3の処理によりレシートが出力される(ステップS27)。   Thereafter, the print data is transmitted to the printer 3 via the communication port 209, and a receipt is output by the processing of the printer 3 (step S27).

以上のようにして、POSアプリケーション201から出力された印刷データを用いた売上情報の取得処理が実行される。   As described above, the sales information acquisition process using the print data output from the POS application 201 is executed.

なお、上記実施の形態例では、印刷データから売上情報を取得する機能について述べたが、さらに、POSアプリケーション201から出力される印刷データを用いて、POSシステムの異なる機能拡張を実行するようにすることもできる。例えば、レシートの印刷データに所定商品名が含まれている場合にはクーポン券を発行する、所定の印刷物である場合には複数毎印刷する、印刷物のレイアウトを変更する、印刷物によって出力先プリンターを変更する、などの処理を追加することができる。   In the above-described embodiment, the function of acquiring sales information from print data has been described. Further, different function extensions of the POS system are executed using the print data output from the POS application 201. You can also. For example, when a predetermined product name is included in the print data of the receipt, a coupon is issued. When a predetermined printed material is printed, a plurality of copies are printed. The layout of the printed material is changed. Processing such as changing can be added.

これら他の処理を実行する場合には、売上情報抽出部204が受け取った印刷データについて以下の処理を実行する機能を備える。まず、印刷データを解析して、印刷物を判別し、あるいは、そのデータに含まれる所定の情報を検出して、印刷物によって定められている、あるいは、その所定の情報に対して定められている処理を決定する。そして、決定された処理に印刷データの加工が必要な場合にはその加工を実行する。その後、印刷データを、上記決定された処理に相応しいプリンターに対応したコマンドで、そのプリンターが接続される通信ポートへ出力する。なお、図2においては、1つの通信ポート209と1台のプリンター3のみを示しているが、POS端末装置2は、複数の通信ポートを備えることが可能であり、従って、それらに接続される複数のプリンターを用いることが可能である。   When executing these other processes, the sales information extraction unit 204 has a function of executing the following processes for the print data received. First, the print data is analyzed to determine the printed material, or the predetermined information included in the data is detected, and the processing determined by the printed material or for the predetermined information To decide. If the determined processing requires processing of print data, the processing is executed. Thereafter, the print data is output to a communication port to which the printer is connected by a command corresponding to the printer suitable for the determined processing. In FIG. 2, only one communication port 209 and one printer 3 are shown. However, the POS terminal device 2 can be provided with a plurality of communication ports, and therefore connected to them. Multiple printers can be used.

また、この場合にも、印刷物と処理の内容、あるいは、上記所定の情報と処理の内容を関係付けて示す情報は、予めデータ格納部207に保存される。   Also in this case, the printed matter and the processing contents, or the information indicating the predetermined information and the processing contents in association with each other are stored in the data storage unit 207 in advance.

以上説明したように、本実施の形態例に係るPOS端末装置2では、POSアプリケーション201から出力された印刷データを用いて売上分析機能を付加することができる。そして、売上分析機能を備えないあるいはその機能が乏しいPOS端末装置及びPOSシステムを、比較的容易な方法で本POS端末装置2及びそれを含むPOSシステムに改良することができる。   As described above, in the POS terminal device 2 according to the present embodiment, the sales analysis function can be added using the print data output from the POS application 201. Then, the POS terminal device and the POS system that do not have the sales analysis function or have a poor function can be improved to the POS terminal device 2 and the POS system including the POS terminal device by a relatively easy method.

図6は、当該改良を説明するための図である。当該図は、図2と同じ機能構成図であり、実線部分が上述した改良前のPOS端末装置及びPOSシステムを示している。すなわち、改良前のシステムは、POSアプリケーション201から直接又はプリンタードライバー202を介して出力された印刷データが通信ポート209で受け取られ、プリンター3から出力がなされる構成となっている。そして、このような構成のシステムに対して、点線で示される部分を追加することにより、本POS端末装置2及びそれを含むPOSシステムにすることが可能である。   FIG. 6 is a diagram for explaining the improvement. This figure is the same functional configuration diagram as FIG. 2, and the solid line portion shows the POS terminal device and POS system before improvement described above. That is, the system before improvement is configured such that print data output directly from the POS application 201 or via the printer driver 202 is received by the communication port 209 and output from the printer 3. And it is possible to make this POS terminal device 2 and the POS system containing it by adding the part shown with a dotted line with respect to the system of such a structure.

すなわち、既存のPOSアプリケーション201を変更することなく、点線で示される部分のプログラム、及び、データ格納部207のデータを追加することにより、既存のPOSシステムの機能拡張が可能となる。また、合わせて、一点鎖線で示す新たなプリンター3Bを追加してもよく、この場合の改良は、新たなプリンター3Bの設置と上記プログラムとデータを含む当該プリンタードライバーソフトウェアのインストールという作業で実行され得る。なお、プリンター3やPOS端末装置2を構成するコンピューター自身も新しい装置に置き換えることが可能である。   In other words, the function of the existing POS system can be expanded by adding the program indicated by the dotted line and the data in the data storage unit 207 without changing the existing POS application 201. In addition, a new printer 3B indicated by an alternate long and short dash line may be added. In this case, the improvement is performed by installing a new printer 3B and installing the printer driver software including the program and data. obtain. Note that the computers constituting the printer 3 and the POS terminal device 2 can be replaced with new devices.

このように、本実施の形態例に係るPOS端末装置2を用いることにより、既存のPOSアプリケーションプログラムの変更を伴わない容易な方法で、売上分析機能の追加を可能にすることができる。また、その他の既存システムに対する機能拡張も、同様に、容易に実現できる。   Thus, by using the POS terminal device 2 according to the present embodiment, it is possible to add a sales analysis function by an easy method that does not involve changing an existing POS application program. In addition, the function expansion for other existing systems can be easily realized.

また、そのための主な処理は、コンピューターのアプリケーション層で行うように構成するので、多彩な処理を実行させるプログラムの開発を容易に行うことができる。   In addition, since the main processing for that purpose is configured to be performed in the application layer of the computer, it is possible to easily develop a program that executes various processing.

また、ルール設定部208により容易に取得ルールが生成され、売上情報の取得時に当該ルールが用いられるので、取得処理の精度と速度を向上させることができる。   Moreover, since the acquisition rule is easily generated by the rule setting unit 208 and used when the sales information is acquired, the accuracy and speed of the acquisition process can be improved.

なお、本実施の形態例では、POSサーバー1が複数のPOS端末装置2と接続されるシステムであったが、本発明は、当該構成に限らず、POS端末装置とプリンターが接続される環境に対して適用することができる。   In the present embodiment, the POS server 1 is a system connected to a plurality of POS terminal devices 2. However, the present invention is not limited to this configuration, and is in an environment where a POS terminal device and a printer are connected. It can be applied to.

また、本実施の形態例では、POS端末装置2のプログラムがROMに記憶されている例を示したが、これらプログラムはROMに限らず、RAMやHDD等の記憶媒体に記憶されていてもよい。また、これらプログラムは別々の記憶媒体に記憶されていてもよい。   In the present embodiment, an example is shown in which the program of the POS terminal device 2 is stored in the ROM. However, these programs are not limited to the ROM, and may be stored in a storage medium such as a RAM or an HDD. . These programs may be stored in separate storage media.

本発明の保護範囲は、上記の実施の形態に限定されず、特許請求の範囲に記載された発明とその均等物に及ぶものである。   The protection scope of the present invention is not limited to the above-described embodiment, but covers the invention described in the claims and equivalents thereof.

1 POSサーバー、 2 POS端末装置、 3 プリンター、 4 ネットワーク、 5 売上分析アプリケーション、 21 POS端末本体、 22 ディスプレイ、
23 キーボード・マウス、 24 バーコードリーダー、 25 カードリーダー、
201 POSアプリケーション、 202 プリンター3用ドライバー、 203 仮想ポート、 204 売上情報抽出部、 205 データ変換部、 206 売上情報出力部、 207 データ格納部、 208 ルール設定部、 209 通信ポート、 220 アプリケーション層、 230 OSカーネル層、 240 物理層
1 POS server, 2 POS terminal device, 3 printer, 4 network, 5 sales analysis application, 21 POS terminal body, 22 display,
23 Keyboard / Mouse, 24 Barcode Reader, 25 Card Reader,
201 POS application, 202 printer 3 driver, 203 virtual port, 204 sales information extraction unit, 205 data conversion unit, 206 sales information output unit, 207 data storage unit, 208 rule setting unit, 209 communication port, 220 application layer, 230 OS kernel layer, 240 physical layer

Claims (6)

OSカーネル層のオペレーティングシステムによって動作し、アプリケーション層のアプリケーションが印刷データを出力する、通信ポートを備えたコンピューターに、売上情報の取得処理を実行させる売上分析用プログラムであって、
ルール設定モードの時に、
前記OSカーネル層で、前記アプリケーションから出力された印刷データを受信し、前記アプリケーション層で、複数の前記受信した印刷データに基づいて取得ルールを生成する工程を、前記コンピューターに実行させ、
前記ルール設定モードでない時に、
前記OSカーネル層で、前記アプリケーションから出力された印刷データを受信する工程と、
前記アプリケーション層で、前記取得ルールに従って、前記受信された印刷データから、売上情報を抽出する工程と、
前記アプリケーション層で、前記抽出された売上情報を、売上分析アプリケーションが処理可能なデータ形式に変換する工程と、
前記変換後の売上情報を、前記コンピューターに接続される売上分析アプリケーションに出力する工程と、
前記受信された印刷データを、プリンターが接続される前記通信ポートへ出力する工程と、を前記コンピューターに実行させる
ことを特徴とする売上分析用プログラム。
A sales analysis program for causing a computer having a communication port, which is operated by an operating system of an OS kernel layer and an application layer application outputs print data, to execute a process of acquiring sales information,
When in rule setting mode,
Receiving the print data output from the application in the OS kernel layer, and causing the computer to execute a step of generating an acquisition rule based on the plurality of received print data in the application layer;
When not in the rule setting mode,
Receiving the print data output from the application at the OS kernel layer ;
In the application layer, in accordance with the acquisition rule, from the received print data, a step of extracting the sales information,
Converting the extracted sales information into a data format that can be processed by a sales analysis application in the application layer; and
Outputting the converted sales information to a sales analysis application connected to the computer;
A program for sales analysis which causes the computer to execute the step of outputting the received print data to the communication port to which a printer is connected.
請求項1において、
前記取得ルールは、取得すべき売上情報の内容と所在に関する情報を含む
ことを特徴とする売上分析用プログラム。
Oite to claim 1,
The acquisition rule includes information on the contents and location of sales information to be acquired.
OSカーネル層のオペレーティングシステムによって動作し、アプリケーション層のアプリケーションが印刷データを出力する、通信ポートを備えたコンピューターからなる売上情報取得装置であって、
前記アプリケーションから出力された印刷データを前記OSカーネル層で受信する仮想ポートと、
前記アプリケーション層で、複数の前記受信された印刷データに基づいて取得ルールを生成するルール設定部と、
前記アプリケーション層で、前記取得ルールに従って、前記受信された印刷データから、売上情報を抽出する売上情報抽出部と、
前記アプリケーション層で、前記抽出された売上情報を、売上分析アプリケーションが処理可能なデータ形式に変換するデータ変換部と、
前記変換後の売上情報を、前記コンピューターに接続される売上分析アプリケーションに出力する売上情報出力部と、を有し、
前記受信された印刷データを、プリンターが接続される前記通信ポートへ出力する
ことを特徴とする売上情報取得装置。
A sales information acquisition device that is operated by an operating system of an OS kernel layer and that includes a computer having a communication port, in which an application layer application outputs print data,
A virtual port for receiving print data output from the application at the OS kernel layer;
A rule setting unit for generating an acquisition rule based on a plurality of the received print data in the application layer;
In the application layer, in accordance with the acquisition rule, from the received print data, and sales information extractor for extracting sales information,
A data conversion unit that converts the extracted sales information into a data format that can be processed by a sales analysis application in the application layer;
A sales information output unit for outputting the converted sales information to a sales analysis application connected to the computer;
The sales information acquisition apparatus, wherein the received print data is output to the communication port to which a printer is connected.
請求項において、
記取得ルールは、取得すべき売上情報の内容と所在に関する情報を含む
ことを特徴とする売上情報取得装置。
In claim 3 ,
Before SL capture rules, sales information acquisition device which comprises an information about the content and location of the sales information to be acquired.
OSカーネル層のオペレーティングシステムによって動作し、アプリケーション層のアプリケーションが印刷データを出力する、通信ポートを備えたコンピューターにおける売上情報取得方法であって、
ルール設定モードの時に、
前記コンピューターが、前記OSカーネル層で、前記アプリケーションから出力された印刷データを受信し、前記アプリケーション層で、複数の前記受信した印刷データに基づいて取得ルールを生成する工程を、有し、
前記ルール設定モードでない時に、
前記コンピューターが、前記アプリケーションから出力された印刷データを前記OSカーネル層で受信する工程と、
前記コンピューターが、前記アプリケーション層で、前記取得ルールに従って、前記受信された印刷データから、売上情報を抽出する工程と、
前記コンピューターが、前記アプリケーション層で、前記抽出された売上情報を、売上分析アプリケーションが処理可能なデータ形式に変換する工程と、
前記コンピューターが、前記変換後の売上情報を、前記コンピューターに接続される売上分析アプリケーションに出力する工程と、
前記コンピューターが、前記受信された印刷データを、プリンターが接続される前記通信ポートへ出力する工程と、を有する
ことを特徴とする売上情報取得方法。
A sales information acquisition method in a computer having a communication port, which is operated by an operating system of an OS kernel layer and an application layer application outputs print data.
When in rule setting mode,
The computer receiving print data output from the application at the OS kernel layer and generating an acquisition rule based on the plurality of received print data at the application layer;
When not in the rule setting mode,
The computer receiving print data output from the application at the OS kernel layer;
The computer, in the application layer, in accordance with the acquisition rule, from the received print data, a step of extracting the sales information,
The computer converting the extracted sales information into a data format that can be processed by a sales analysis application in the application layer;
The computer outputting the converted sales information to a sales analysis application connected to the computer;
The computer includes a step of outputting the received print data to the communication port to which a printer is connected.
請求項において、
記取得ルールは、取得すべき売上情報の内容と所在に関する情報を含む
ことを特徴とする売上情報取得方法。
In claim 5 ,
Before SL capture rules, sales information acquisition method, which comprises information about the content and location of the sales information to be acquired.
JP2011047757A 2011-03-04 2011-03-04 Sales analysis program using print data, sales information acquisition device, and sales information acquisition method Expired - Fee Related JP5736851B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011047757A JP5736851B2 (en) 2011-03-04 2011-03-04 Sales analysis program using print data, sales information acquisition device, and sales information acquisition method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011047757A JP5736851B2 (en) 2011-03-04 2011-03-04 Sales analysis program using print data, sales information acquisition device, and sales information acquisition method

Publications (3)

Publication Number Publication Date
JP2012185635A JP2012185635A (en) 2012-09-27
JP2012185635A5 JP2012185635A5 (en) 2014-04-17
JP5736851B2 true JP5736851B2 (en) 2015-06-17

Family

ID=47015683

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011047757A Expired - Fee Related JP5736851B2 (en) 2011-03-04 2011-03-04 Sales analysis program using print data, sales information acquisition device, and sales information acquisition method

Country Status (1)

Country Link
JP (1) JP5736851B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160232512A1 (en) * 2013-12-13 2016-08-11 Seiko Epson Corporation Information Generating Method, Information Processing Device, and POS System
JP6766503B2 (en) * 2016-07-29 2020-10-14 セイコーエプソン株式会社 Information processing device, control method of information processing device, and control program

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH08111770A (en) * 1994-10-13 1996-04-30 Canon Inc Image forming device
JP2005144994A (en) * 2003-11-19 2005-06-09 Seiko Epson Corp Printer, its controlling method, and program
JP2005321873A (en) * 2004-05-06 2005-11-17 Seiko Epson Corp Electronic journal creation system, method, and program
JP4670264B2 (en) * 2004-06-03 2011-04-13 セイコーエプソン株式会社 Printing apparatus, printer interface, POS system, program, and printing apparatus control method
JP2006318158A (en) * 2005-05-12 2006-11-24 Seiko Epson Corp Printing system, pos system, connection device, control method for printing system and program therefor
JP2007047941A (en) * 2005-08-08 2007-02-22 Canon Inc Electronic equipment, network system and control method
JP2007058463A (en) * 2005-08-23 2007-03-08 Star Micronics Co Ltd Receipt image printing system, control method for receipt image printing system, and program
JP4796892B2 (en) * 2006-05-10 2011-10-19 株式会社ハイパーギア Printing program
JP2009226689A (en) * 2008-03-21 2009-10-08 Seiko Epson Corp Printer
JP5082965B2 (en) * 2008-03-21 2012-11-28 セイコーエプソン株式会社 Printing apparatus and information management system

Also Published As

Publication number Publication date
JP2012185635A (en) 2012-09-27

Similar Documents

Publication Publication Date Title
US9262106B2 (en) Method of adding value to print data, a value-adding device, and a recording medium
JP2012190114A (en) Sales analytical program using print data, sales information acquisition device, and sales information acquisition method
KR101364808B1 (en) Function expansion method using print data, function expansion device, and recording medium
US9058139B2 (en) Function expansion method using print data, and function expansion device
US9898691B2 (en) Control device, control system, and control method of a control device
JP5742416B2 (en) Advertising function expansion program, advertising function expansion method, and host device
JP5736851B2 (en) Sales analysis program using print data, sales information acquisition device, and sales information acquisition method
JP2012185635A5 (en)
JP5708012B2 (en) Printer changing program, printer changing method, and host device
JP5867564B2 (en) Print data processing program for distributing output destinations, print data processing apparatus, and print data processing method
JP5867563B2 (en) Function expansion program, function expansion device, and function expansion method using print data
JP2012058846A (en) Print data processing program for distributing output destination, print data processing device, and print data processing method
JP2012168758A (en) Printed matter editing program, printed matter editing device and printed matter editing method
JP5867565B2 (en) Print data value addition program, value addition apparatus, and value addition method
JP6075427B2 (en) Print control method and printer driver
JP5609453B2 (en) Distributed processing method, distributed processing apparatus, and program
JP5842971B2 (en) Distributed processing method, distributed processing apparatus, and program
JP2012208765A (en) Print content change program, print content change method, and host device
JP2015149077A (en) Program for changing printer, method for changing printer, and host device

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140227

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140227

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20140916

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20140924

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141120

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: 20150324

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150406

R150 Certificate of patent or registration of utility model

Ref document number: 5736851

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees