JP2020086893A - Two-dimensional code evaluation system and method - Google Patents
Two-dimensional code evaluation system and method Download PDFInfo
- Publication number
- JP2020086893A JP2020086893A JP2018219939A JP2018219939A JP2020086893A JP 2020086893 A JP2020086893 A JP 2020086893A JP 2018219939 A JP2018219939 A JP 2018219939A JP 2018219939 A JP2018219939 A JP 2018219939A JP 2020086893 A JP2020086893 A JP 2020086893A
- Authority
- JP
- Japan
- Prior art keywords
- code
- data
- information
- dimensional
- codes
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 355
- 238000011156 evaluation Methods 0.000 title claims description 35
- 230000008569 process Effects 0.000 claims abstract description 289
- 238000012545 processing Methods 0.000 claims description 137
- 238000000605 extraction Methods 0.000 claims description 19
- 238000012937 correction Methods 0.000 description 62
- 238000010586 diagram Methods 0.000 description 32
- 238000006243 chemical reaction Methods 0.000 description 23
- 230000006870 function Effects 0.000 description 15
- 238000007639 printing Methods 0.000 description 14
- 238000005286 illumination Methods 0.000 description 13
- 238000007726 management method Methods 0.000 description 10
- 230000010365 information processing Effects 0.000 description 9
- 238000004891 communication Methods 0.000 description 8
- 238000004364 calculation method Methods 0.000 description 7
- 239000000284 extract Substances 0.000 description 6
- 238000013500 data storage Methods 0.000 description 5
- 238000001514 detection method Methods 0.000 description 5
- 230000000694 effects Effects 0.000 description 5
- 238000003384 imaging method Methods 0.000 description 5
- 239000004973 liquid crystal related substance Substances 0.000 description 5
- 230000000007 visual effect Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 4
- 230000007257 malfunction Effects 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 3
- 230000007274 generation of a signal involved in cell-cell signaling Effects 0.000 description 3
- 230000002776 aggregation Effects 0.000 description 2
- 238000004220 aggregation Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 238000012854 evaluation process Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000010561 standard procedure Methods 0.000 description 2
- HBBGRARXTFLTSG-UHFFFAOYSA-N Lithium ion Chemical compound [Li+] HBBGRARXTFLTSG-UHFFFAOYSA-N 0.000 description 1
- 206010028980 Neoplasm Diseases 0.000 description 1
- 230000003321 amplification Effects 0.000 description 1
- 239000008280 blood Substances 0.000 description 1
- 210000004369 blood Anatomy 0.000 description 1
- 201000011510 cancer Diseases 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 239000013256 coordination polymer Substances 0.000 description 1
- 125000004122 cyclic group Chemical group 0.000 description 1
- 238000009792 diffusion process Methods 0.000 description 1
- 201000010099 disease Diseases 0.000 description 1
- 208000037265 diseases, disorders, signs and symptoms Diseases 0.000 description 1
- 239000003814 drug Substances 0.000 description 1
- 229940079593 drug Drugs 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 229910001416 lithium ion Inorganic materials 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000011159 matrix material Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000008450 motivation Effects 0.000 description 1
- 238000003199 nucleic acid amplification method Methods 0.000 description 1
- 230000008707 rearrangement Effects 0.000 description 1
- 238000004092 self-diagnosis Methods 0.000 description 1
Images
Abstract
Description
本発明は、二次元コード評価システム及び方法に関するものである。 The present invention relates to a two-dimensional code evaluation system and method.
関連二次元コードは、既によく知られている。関連二次元コードとは、当該関連二次元コードに関連付けられた他の関連二次元コードが存在する二次元コードである。 Related two-dimensional codes are already well known. The related two-dimensional code is a two-dimensional code in which there is another related two-dimensional code related to the related two-dimensional code.
このような関連二次元コードの代表的な例としては、JIS規格の第9章に規定されている構造的連接関係を有するQRコード(登録商標)(構造的連接QRコードとも呼ぶ)を挙げることができ、このコードを利用した技術も提案されている(例えば、特許文献1参照。)
As a typical example of such a related two-dimensional code, there is a QR code (registered trademark) (also referred to as a structurally connected QR code) having a structurally connected relationship specified in
ところで、人、物等の対象の真正性が担保される要請がある。つまり、当該対象が真正な者であり(又は、真正な者により作成や管理が成された物であり)、悪徳な業者等が介入していないことが保証される必要がある。 By the way, there is a demand for ensuring the authenticity of objects such as people and goods. In other words, it is necessary to ensure that the subject is a genuine person (or is an object created or managed by a genuine person) and that no vicious trader is intervening.
本発明は、上述した課題を解決するためになされたもので、その目的とするところは、対象を二次元コードで管理する際に真正性を担保することを、関連二次元コードに係る技術を用いて、適切に実現することにある。 The present invention has been made to solve the above-described problems, and an object of the present invention is to ensure authenticity when managing an object with a two-dimensional code. It is to use it properly.
本発明に係る二次元コードの生成方法は、互いに関連付けられた複数の関連二次元コードを生成する二次元コード生成方法であって、開示するデータを表すコード語としてコード化された開示データコードの総数が、コード語を配置すべきコード領域に収容可能な容量に満たない場合、前記コード領域に配置された前記開示データコードがなすコード列の終端を示す終端識別コードをこのコード列の最後に配置するとともに、前記コード領域の空き部分にデータを表さないパディングコードを配置し、秘匿するデータを表すコード語としてコード化された非公開データコードを前記パディングコードの一部または全部に代えて、前記終端識別コードの後に配置する二次元コードの生成工程を、複数回実行することにより、前記複数の関連二次元コードの各々を生成し、各々の前記生成工程において前記非公開データコードを配置する際に、前記複数の関連二次元コードが互いに関連付けられていることを特定可能とするための関連コード情報を前記非公開データコードに含ませることを特徴とする。 A two-dimensional code generation method according to the present invention is a two-dimensional code generation method for generating a plurality of related two-dimensional codes that are associated with each other, and a disclosed data code encoded as a code word representing data to be disclosed. When the total number is less than the capacity that can be accommodated in the code area in which the code word is to be arranged, the end identification code indicating the end of the code string formed by the disclosed data code arranged in the code area is added to the end of this code string. A padding code that does not represent data is placed in a vacant portion of the code area, and a secret data code encoded as a code word that represents secret data is replaced with part or all of the padding code. , Generating a two-dimensional code to be arranged after the terminal identification code a plurality of times to generate each of the plurality of related two-dimensional codes, and disposing the private data code in each of the generating steps. In doing so, the related code information for making it possible to specify that the plurality of related two-dimensional codes are related to each other is included in the private data code.
本発明に係る二次元コードの生成システムは、互いに関連付けられた複数の関連二次元コードを生成する二次元コード生成システムであって、開示するデータを表すコード語としてコード化された開示データコードの総数が、コード語を配置すべきコード領域に収容可能な容量に満たない場合、前記コード領域に配置された前記開示データコードがなすコード列の終端を示す終端識別コードをこのコード列の最後に配置するとともに、前記コード領域の空き部分にデータを表さないパディングコードを配置し、秘匿するデータを表すコード語としてコード化された非公開データコードを前記パディングコードの一部または全部に代えて、前記終端識別コードの後に配置する二次元コードの生成工程を、複数回実行することにより、前記複数の関連二次元コードの各々を生成し、各々の前記生成工程において前記非公開データコードを配置する際に、前記複数の関連二次元コードが互いに関連付けられていることを特定可能とするための関連コード情報を前記非公開データコードに含ませることを特徴とする。 A two-dimensional code generation system according to the present invention is a two-dimensional code generation system that generates a plurality of related two-dimensional codes that are associated with each other, and discloses a disclosed data code encoded as a code word that represents disclosed data. When the total number is less than the capacity that can be accommodated in the code area in which the code word is to be arranged, the end identification code indicating the end of the code string formed by the disclosed data code arranged in the code area is added to the end of this code string. A padding code that does not represent data is placed in a vacant portion of the code area, and a secret data code encoded as a code word that represents secret data is replaced with part or all of the padding code. , Generating a two-dimensional code to be arranged after the terminal identification code a plurality of times to generate each of the plurality of related two-dimensional codes, and disposing the private data code in each of the generating steps. In doing so, the related code information for making it possible to specify that the plurality of related two-dimensional codes are related to each other is included in the private data code.
上述した構成からなる本発明によれば、対象を二次元コードで管理する際に真正性を担保することを関連二次元コードに係る技術を用いて、適切に実現することができる。 According to the present invention having the above-described configuration, it is possible to appropriately realize ensuring of authenticity when managing an object with a two-dimensional code by using a technique related to the related two-dimensional code.
関連二次元コード
図1は、拡張エンコーダ60のブロック図を示している。拡張エンコーダ60は、開示情報のみならず非公開情報を含んだ情報をQRコードシンボル61に変換する装置である。拡張エンコーダ60は、制御部61と表示装置63と印刷装置64と入力装置65を備えている。
Related Two-Dimensional Code FIG. 1 shows a block diagram of an extended
制御部61は、演算部61aと記憶部61bを備えている。演算部61aは中央演算装置等からなり、プログラムの実行および種々の演算を行うものである。記憶部61bは、プログラムの実行に際して、必要なデータの記憶を行う。特に、記憶部61bには、各種処理を実行するためのプログラムが記憶されている。
The
表示装置63は、データの入力等に際し必要な表示機能を担う。また、表示装置63は、生成されたQRコードシンボル61をディスプレイ等の表示装置に表示する。印刷装置64も、生成されたQRコードシンボル61を印刷により紙媒体等に表示する。また、入力装置65は、データの入力および拡張エンコーダ70の操作に使用される。
The display device 63 has a display function required when data is input. The display device 63 also displays the generated
本実施の形態においては、二次元コード(QRコード)として、関連二次元コード(QRコードの関連二次元コードであるため、以下、関連QRコードという)が用いられる。関連QRコードとは、当該関連QRコードに関連付けられた他の関連QRコードが存在するQRコードである。即ち、通常のQRコードは、それ自身で独立しており、他のQRコードとは無関係であるが、関連QRコードは他の関連QRコードと関連付けられており、各々の関連QRコードは互いに連鎖している。 In the present embodiment, a related two-dimensional code (hereinafter referred to as a related QR code because it is a related two-dimensional code of the QR code) is used as the two-dimensional code (QR code). The related QR code is a QR code in which another related QR code related to the related QR code exists. That is, a normal QR code is independent of itself and independent of other QR codes, but an associated QR code is associated with another associated QR code, and each associated QR code is linked to each other. is doing.
このような関連QRコードの代表的な例としては、JIS規格の第9章に規定されている構造的連接関係を有するQRコード(構造的連接QRコードともいう)を挙げることができる。構造的連接QRコードとは、自身のコード情報が、あるコード情報をもとに互いに関連を持って分割された部分的コードであることが判別可能に組み込まれたコードである。即ち、これを利用することにより大コードを、関連を持った複数の小コードに分割することが可能となり、分割された複数の小コードが関連QRコードとなる。
A typical example of such a related QR code is a QR code having a structural connection relationship (also referred to as a structural connection QR code) specified in
しかしながら、本明細書で取り扱う関連二次元コードは、このようなJIS規格標準の構造的連接QRコードではない。以下では、JIS規格標準の構造的連接QRコードのことを標準関連QRコードともいい、本稿で取り扱う関連二次元コードを拡張関連QRコードともいう。 However, the related two-dimensional code dealt with in the present specification is not such a JIS standard standard structurally connected QR code. In the following, the JIS standard structurally connected QR code is also referred to as a standard related QR code, and the related two-dimensional code handled in this document is also referred to as an extended related QR code.
詳細については後述するが、標準関連QRコードと拡張QRコードの相違点は、以下の通りである。即ち、標準関連QRコードでは、複数の関連QRコードが互いに関連付けられていることを特定可能とするための関連コード情報(JIS規格の8.3.7章に定義があり、9.1章に記載されている構造的連接へッダ)が隠蔽されておらず、従って、標準デコーダで関連QRコードを読み込んだ際に、標準デコーダは当該QRコードが関連QRコード(構造的連接QRコード)であることを把握することが可能となる。 Although the details will be described later, the difference between the standard-related QR code and the extended QR code is as follows. That is, in the standard related QR code, related code information for defining that a plurality of related QR codes are related to each other (defined in Chapter 8.3.7 of JIS standard and described in Chapter 9.1). The structural connection header is not hidden. Therefore, when the standard decoder reads the related QR code, the standard decoder recognizes that the relevant QR code is the related QR code (structural connection QR code). It becomes possible to do.
一方で、拡張関連QRコードでは、前記関連コード情報が非公開データコード語に含まれているため(つまり、関連コード情報が隠蔽されているため)、標準デコーダで関連QRコードを読み込んだ際に、標準デコーダは当該QRコードが関連QRコードであることを把握することができない(言い換えれば、通常のQRコードと認識する)そして、非公開データコード語(非公開情報)を取り扱うことができる拡張デコーダ70で読み込むことにより、初めて当該QRコードが関連QRコードであることを認識することが可能となる。
On the other hand, in the extended related QR code, since the related code information is included in the secret datacode word (that is, the related code information is hidden), when the related QR code is read by the standard decoder. , The standard decoder cannot recognize that the QR code is a related QR code (in other words, recognize it as a normal QR code) and an extension that can handle a private datacode word (private information) Only when the QR code is read by the
図2は、本実施の形態に係る関連QRコード(拡張関連QRコード)のRSブロックの概要図である。まず、図2を参照しつつ、拡張関連QRコードのデータフォーマットの概要、及び非公開データコード語(非公開情報及び関連コード情報)を埋め込む手法について説明する。図2には、誤り訂正処理単位として、RS(リード・ソロモン)ブロックが示されている。QRコードシンボル1には、1または複数のRSブロックが含まれる。そして、RSブロックを1つの誤り訂正処理単位としている。
FIG. 2 is a schematic diagram of the RS block of the related QR code (extended related QR code) according to the present embodiment. First, with reference to FIG. 2, an outline of a data format of an extended related QR code and a method of embedding a secret datacode word (secret information and related code information) will be described. FIG. 2 shows an RS (Reed Solomon) block as an error correction processing unit. The
なお、ここで説明する実施形態においては、リード・ソロモン(RS)符号による誤り訂正方式を採用している。このため、誤り検出訂正演算の処理単位ブロックの一例として、「RSブロック」と記載している。 In the embodiment described here, an error correction method using a Reed-Solomon (RS) code is adopted. Therefore, “RS block” is described as an example of a processing unit block of the error detection/correction calculation.
非公開データコードの配置前である配置前RSブロック(配置前コードブロックに相当。後に、配置後RSブロックが登場するため、以下では配置前RSブロックとして配置後RSブロックとは区別する)は、表示対象である情報本体(開示情報に相当する)と、非表示部分である終端符号と、非表示部分であるパディングコード語とを有する開示データコード語を含む。配置前のRS符号はパディング領域が標準のものに対応した誤り訂正語である。情報本体とは、標準デコーダであってもQRコードシンボル1を読み取ったときにデコード可能な情報である。終端符号は、情報本体の終端を表す符号である。パディングコード語は、情報本体のコード語の総数がQRコードシンボル1の容量に満たない場合、空のコード語部分を充填する目的で使用される仮のコード語である。誤り訂正コード語としてのRS(リード・ソロモン)符号は、RSブロックを単位として誤り訂正するために付加される符号である。
The pre-placement RS block before the placement of the private data code (corresponding to the pre-placement code block. Since the post-placement RS block appears later, it is distinguished from the post-placement RS block as the pre-placement RS block below), It includes a disclosure data code word having an information body (corresponding to disclosure information) that is a display target, a terminal code that is a non-display portion, and a padding code word that is a non-display portion. The RS code before arrangement is an error correction word corresponding to the standard padding area. The information body is information that can be decoded when the
QRコードでは、「L」、「M」、「Q」、「H」の4段階の誤り訂正レベルが選択可能である。誤り訂正レベル「L」では、全体の語数に対して約7%の誤り訂正能力を有する。例えば、RSブロックの語数を100%とした場合、そのうちの約7%の誤り訂正能力を有する。誤り訂正レベル「M」では、全体の語数に対して約15%の訂正能力を有する。誤り訂正レベル「Q」では、全体の語数に対して約25%の訂正能力を有する。誤り訂正レベル「H」では、全体の語数に対して約30%の誤り訂正能力を有する。本実施の形態では、例えば、最高クラスの誤り訂正能力である「H」を利用して、非公開データコード語(非公開情報及び関連コード情報)をQRコードに隠蔽する。但し、コードシンボルが形成された媒体の破損の虞の程度に応じて、あるいは方式によっては隠蔽される非公開データコード語の語数に応じて誤り訂正レベルを変更してもよい。 With the QR code, four error correction levels of “L”, “M”, “Q”, and “H” can be selected. The error correction level “L” has an error correction capability of about 7% with respect to the total number of words. For example, when the number of words in the RS block is 100%, about 7% of them have an error correction capability. The error correction level “M” has a correction ability of about 15% with respect to the total number of words. The error correction level “Q” has a correction capability of about 25% with respect to the total number of words. The error correction level “H” has an error correction capability of about 30% with respect to the total number of words. In the present embodiment, for example, “H”, which is the highest class error correction capability, is used to hide a secret datacode word (secret information and related code information) in a QR code. However, the error correction level may be changed according to the degree of risk of damage to the medium on which the code symbol is formed, or depending on the number of hidden datacode words hidden depending on the method.
QRコードに情報を隠蔽すなわち非公開情報を格納する手法の概念は、次の通りである。ここで情報の「隠蔽」とは、標準の方法(装置、ソフトウェア等。具体例は、デコーダ)によって読み出し取得ができる通常の情報とは異なり、標準の方法(装置、ソフトウェア等。具体例は、デコーダ)では読出取得できないようにすることを意味する。図2には、非公開データコード語が示されている。この図2の例では、非公開データコード語を、後続のデータコードが前記非公開データコードであることを示す秘匿識別コード(秘匿識別子)と、非公開データコードのデータ長をコード化したデータ長情報(単に「データ長」ともいう)と、非公開データコードとにより構成している。ここでは、この非公開データコード語を、通常の開示データコード語の終端を示す終端識別コードの後ろにパディングコード語の少なくとも一部に代えて配置する。このあと配置後のRSブロックに基づいて誤り訂正コード語としてのRS符号を生成して規定の位置に付加する。このように、配置した場合であっても、標準デコーダでは、配置後の情報本体部分は終端コード語の前までとして取り出すことができ、必要に応じてRS符号を用いて訂正することができる。そして、訂正後の情報本体部分を読み出して表示することが可能となる。一方、非公開データコード語は、終端識別コードの、本来はパディングコード語が置かれる部分に配置されるため、標準デコーダでは捨てられてしまい表示されないことになる。なお、非公開データコード語は配置後に生成されるRS符号によって誤り訂正が可能であるため、非公開データコード語を処理できるデコーダ(図9に示す拡張デコーダ70)では必要に応じて訂正後の非公開データコード語を取り出すことができる。
The concept of the method of hiding information in the QR code, that is, storing private information is as follows. Here, "concealment" of information is different from normal information that can be read and acquired by a standard method (device, software, etc.; a specific example is a decoder), and is different from the standard method (device, software, etc. It means that it cannot be read and acquired by a decoder). In FIG. 2, private datacode words are shown. In the example of FIG. 2, data obtained by coding a secret datacode word is a secret identification code (secret identifier) indicating that the subsequent data code is the secret data code, and the data length of the secret data code. It is composed of long information (also simply referred to as “data length”) and a secret data code. Here, this private data code word is arranged in place of at least a part of the padding code word after the end identification code indicating the end of the normal disclosed data code word. After that, an RS code as an error correction code word is generated based on the RS block after arrangement and is added to a prescribed position. In this way, even with the arrangement, in the standard decoder, the information main body portion after the arrangement can be taken out as before the termination code word, and can be corrected using the RS code as necessary. Then, the corrected information body portion can be read and displayed. On the other hand, since the secret datacode word is arranged in the part of the termination identification code where the padding code word is originally placed, it is discarded by the standard decoder and is not displayed. Since the private datacode word can be error-corrected by the RS code generated after the arrangement, the decoder (extended
これに対し、拡張デコーダ70では、後述するように、必要に応じて誤り訂正処理を施したあと、配置後RSブロックから情報本体部分とともに非公開データコード語を抽出することができる。以上の原理によりQRコードシンボル1に非公開情報及び関連コード情報を隠蔽することができる。なお、非公開データコード語によるRSブロックの配置方法の詳細については、後述する。
On the other hand, in the
上述したとおり、図2に示すように、関連コード情報は、非公開情報と共に非公開データコード語に含まれている。図2の例では、この関連コード情報をデータ長と非公開データコードとの間に含ませている。但し、この関連コード情報を含む非公開データコードは、先頭の非公開データコード語(つまり、先頭の配置前RSブロックの配置対象となる非公開データコード語)のみである(ただし、先頭に限定されるものではなく、例えば二番目の非公開データコード語のみであってもよい)本実施の形態に係る関連コード情報は、図3に示すように、識別情報と、連鎖数情報と、序列番号情報と、指標情報と、を有している。なお図3は、関連コード情報の一例を示した図である。 As described above, as shown in FIG. 2, the related code information is included in the private datacode word together with the private information. In the example of FIG. 2, this related code information is included between the data length and the private data code. However, the private data code that includes this related code information is only the private data code word at the beginning (that is, the private data code word that is the placement target of the RS block before placement at the beginning) (however, it is limited to the beginning (For example, it may be only the second secret datacode word.) The related code information according to the present embodiment is, as shown in FIG. 3, identification information, chain number information, and order. It has number information and index information. Note that FIG. 3 is a diagram showing an example of the related code information.
識別情報は、QRコードが関連QRコードであるか否かを示す情報である。この識別情報は、全ての関連QRコードに対して共通のものであり(通常のQRコードでなく関連QRコードであれば同じ値を採用)、本実施の形態(図3の例)では、当該識別情報を「010 10000(2進数)」としている。そして、拡張デコーダ70が、この数値「01010000 (2進数)」を読み取ることにより、QRコードが(通常の関連QRコードではなく)関連QRコードであることを把握することが可能なようになっている。
The identification information is information indicating whether the QR code is a related QR code. This identification information is common to all related QR codes (the same value is used for related QR codes instead of normal QR codes), and in the present embodiment (example of FIG. 3), The identification information is “010 10000 (binary number)”. Then, the
連鎖数情報は、互いに関連付けられた複数の関連QRコードの連鎖数を示す情報である。即ち、連鎖数情報は、互いに関連付けられた複数の関連QRコードから構成されるQRコードグループ(集合体)の要素数とも言える。図3の例では、連鎖数情報は「3 (10進数)」であり、三つの関連QRコード(QRコードA、QRコードB、QRコードC)が互いに関連付けられていることを意味している。 The chain number information is information indicating the chain number of a plurality of related QR codes associated with each other. That is, the chain number information can also be said to be the number of elements of a QR code group (aggregate) formed of a plurality of related QR codes associated with each other. In the example of FIG. 3, the chain number information is “3 (decimal number)”, which means that three related QR codes (QR code A, QR code B, QR code C) are associated with each other. ..
序列番号情報は、当該関連口ード情報を備える関連QRコードが、前記連鎖数分の関連QRコードのうちの何番目の関連QRコードであるかを示す情報である。図3の例では、QRコードAの序列番号情報は「1 (10進数)」であり、したがって、QRコードAは、3個中1番目の関連QRコードとなっている。同様に、QRコードB、QRコードCの序列番号情報は「2 (10進数)」、「3 (10進数)」であり、従って、QRコードB、QRコードCは、3個中2番目、3番目の関連QRコードとなっている。 The order number information is information indicating the number of the related QR code of the related QR code including the related code information, among the related QR codes corresponding to the number of chains. In the example of FIG. 3, the sequence number information of the QR code A is “1 (decimal number)”, and therefore the QR code A is the first related QR code among the three. Similarly, the sequence number information of the QR code B and the QR code C is "2 (decimal number)" and "3 (decimal number)". Therefore, the QR code B and the QR code C are the second of the three, It is the third related QR code.
指標情報は、関連コード,情報を備える関連QRコードが、該関連QRコードと序列番号が異なる他の関連QRコードと関連付けられているか否かを判断するための情報である。本実施の形態では、当該指標情報として、互いに関連付けられた複数の関連QRコードに共通のパスワードを用いることとしている。図3の例では、このパスワードをAF(16進数)としており、したがって、QRコードA、QRコードB、QRコードCの各々の指標情報はAF(16進数)となっている。そして、拡張デコーダ70が、このパスワード「AF(16進数)」をQRコードA、QRコードB、QRコードCの各々から読み取りパスワードが一致していることを確認することによって、QRコードA (QRコードB、QRコードC)が該QRコードA(QRコードB、QRコードC)と序列番号が異なる、他の関連QRコードと関連付けられているか否か(つまり、QRコードA、QRコードB、QRコードCが関連付けられていること)を判断することが可能なようになっている。
The index information is information for determining whether or not the related QR code including the related code and the information is related to another related QR code having a different order number from the related QR code. In this embodiment, a password common to a plurality of related QR codes associated with each other is used as the index information. In the example of FIG. 3, this password is AF (hexadecimal number), and therefore, the index information of each of QR code A, QR code B, and QR code C is AF (hexadecimal number). Then, the
なお、図3の例においては、序列番号が1のQRコードA及び序列番号が2のQRコードBと関連付けられている序列番号が3のQRコードは、QRコードCのみであるが、このような序列番号が3のQRコードが複数あってもよいことは勿論である。
In the example of FIG. 3, the QR code with the
例えば、図4Aに示すように、序列番号が3のQRコードとして、QRコードCの他にQRコードC'が存在する場合もある。そして、かかるQRコードC'の関連コード情報は、QRコードCと同じとなる。なお、QRコードCとQRコードC'は関連付けられてぃないので、QRコードAとQRコードBとQRコードC(又は、QRコードAとQRコードBとQRコードCとQRコードC')は、互いに関連付けられた複数の関連QRコードといえるが、QRコードAとQRコードBとQRコードCとQRコードC'は、互いに関連付けられた複数の関連QRコードとはいえない。
For example, as shown in FIG. 4A, there may be a case where a QR code C′ in addition to the QR code C exists as the QR code having the
また、QRコードA、QRコードBについても同様のことがいえ、例えば、図4Bに示すように、QRコードA'、QRコードA"、QRコードB'が更に存在することとしてもよいことは勿論である。 The same applies to the QR code A and the QR code B. For example, as shown in FIG. 4B, the QR code A′, the QR code A″, and the QR code B′ may further exist. Of course.
次に、具体的な関連QRコードの生成方法について、図3の例に基づいて説明する(すなわち、QRコードA、QRコードB、QRコードCを生成する方法を例にとり説明する)。 Next, a specific method of generating the related QR code will be described based on the example of FIG. 3 (that is, a method of generating the QR code A, the QR code B, and the QR code C will be described as an example).
図5は、QRコードシンボル生成方法のフローチャートである。図6は、関連QRコードのRSブロックの構成図である。図7は、関連QRコードの非公開データコード語の図である。以下の説明において、特段のことわりがない場合、QRコードシンボル1へのエンコード手法は、JIS規格による手法が採用される。なお、QRコードシンボル1は、複数のRSプロックを有する場合が殆どであるが、ここでは説明の容易のために、1つのRSブロックを例示して説明を行う。また、以下に示される内容は容易な説明を行うための例示であるので、各コード語長は実際のものと異なることがあることは勿論である。
FIG. 5 is a flowchart of the QR code symbol generation method. FIG. 6 is a configuration diagram of the RS block of the related QR code. FIG. 7 is a diagram of a secret datacode word of the related QR code. In the following description, unless otherwise specified, a method based on JIS is adopted as the encoding method for the
前提として、記憶部61bには、所定の方法で定めることができる非公開データコード語として配置される開始位置と非公開データコード語の長さ(語数)にかかわる情報開始位置情報と長さ情報が記憶されているものとする。同様に、非公開データコード語における関連コード情報の開始位置(本実施の形態では、非公開データコード語の先頭とする)と長さにかかわる情報が記載されているものと仮定する。なお、どの部分がどれ位の長さだけ非公開データコード語として配置されるか、また、非公開データコード語のどの部分がどれ位の長さだけ関連コード清報で占められるかをどのように定めるかについては、任意であり、何ら本実施の形態の方法に限定されるものではないことは勿論である。
As a premise, in the
先ず、QRコードAに係るQRコードシンボル1に埋め込まれる情報本体および非公開情報が取り込まれる(S1302)。ここでは、情報本体を「TOKYO<cr>MINATO<cr>JPN」とし(図6)、非公開情報を「1234567890」と仮定している(図7)。
First, the information body and non-public information embedded in the
次に、QRコードシンボル1の非公開データコード語を、取り込まれた非公開情報に関連コード情報を付加することにより求める(S1303)。これにより、非公開情報と関連コード情報を含んだ非公開データコード語が作成される。本実施の形態においては、図7に示すように、関連コード情報(「01010000 (2進数)」を16進数に変換した「50 h」、「3 (1 0進数)」「1 (10進数)」を16進数に変換した「31h」、パスワード「AFh」)と、非公開情報(「123567890」)を、非公開データコード語に含ませることにより、非公開データコード語が求められることになる。
Next, the secret datacode word of the
次に、取り込まれた情報本体(開示データコード語)及び非公開データコード語に基づいてQRコードシンボル1の型番が決定される(S1304)。QRコードシンボル1は型番に応じてトータルのコード語数が定められている。トータルのコード語数は、情報本体(開示情報語の語数を含むデータコード語数と、訂正コード語数との和で構成される。また、QRコードシンボル1の型番に応じて、データコード語と訂正コード語からなるRSブロックの大きさと数が定められている。そして、誤り訂正は、RSブロックを単位として行われる。
Next, the model number of the
例えば、誤り訂正レベルが「M」であって型番が「4」の場合、トータルのコード語数は「100」と定められる。そして、2つのRSブロックを含むことが定められる。1つのRSブロックにおけるデータコード語数は「32」であり、訂正コード語数は「18」である。 For example, when the error correction level is “M” and the model number is “4”, the total number of code words is set to “100”. Then, it is defined to include two RS blocks. The number of data code words in one RS block is “32”, and the number of corrected code words is “18”.
データコード語数「32」と訂正コード語数「18」の和は「50」であり、このようなRSブロックが2つ存在するため、型番が「4」のQRコードシンボルは、50x2=100の総コード語数を有することになる。 The sum of the number of data code words "32" and the number of correction code words "18" is "50". Since there are two such RS blocks, the QR code symbol with the model number "4" has a total of 50x2=100. Will have code words.
また、このときの誤り訂正数は、RSブロック毎に「9」である。これは、データコード語数「32」のうちの「9」を訂正する能力を有することを示す。RSブロックは2つであるため、9×2=18の語数の総訂正能力を有することになる。100語のうち18語を訂正可能としているので、全体からすると18%の訂正能力を有することとなる。 The number of error corrections at this time is “9” for each RS block. This indicates that it has the ability to correct “9” of the data code word number “32”. Since there are two RS blocks, it has a total correction capability of 9×2=18 words. Since it is possible to correct 18 words out of 100 words, it has a correction ability of 18% from the whole.
非公開データコード語の配置は、RSブロック毎に、開示情報である情報本体すなわち開示情報語のコード語数が選択されたRSブロックのデータコード語数未満となるようにして(S1306)、その後ろに終端識別コード語を置き、通常はパディングコード語が配置されるところを秘匿識別子と非公開データコード語のデータ長を示すコード語に続いて非公開データコード語を配置する。あとは選択されたRSブロックのデータコード語数まで規定のパディングコード語を置く(パディングコード語の語数がゼロの場合もある)(S1308)。
上記の場合であると、RSブロック毎にデータコード語数「32」を合計とする情報本体と終端識別コード語と秘匿識別子とデータ長を示すコード語と非公開データコード語による配置が許容されることになる(「総配置許容語数)と呼ぶことがある)。このような演算に基づいて、情報本体(開示データコード語)の語数と非公開データコード語数の合計が総配置許容語数を上回らないようなRSブロックで構成される最小サイズのQRコードシンボル1の型番が選択される。
The arrangement of the secret data code word is such that, for each RS block, the number of code words of the information body that is the disclosure information, that is, the disclosure information word, is less than the number of data code words of the selected RS block (S1306), and after that. The end identification code word is placed, and normally, the secret data and the private data code word are arranged at the place where the padding code word is arranged, following the code word indicating the data length of the private data code word. After that, prescribed padding code words are placed up to the number of data code words of the selected RS block (the number of padding code words may be zero) (S1308).
In the above case, the arrangement of the information body that sums the number of data code words "32" for each RS block, the termination identification code word, the secret identifier, the code word indicating the data length, and the private data code word is allowed. Based on this type of calculation, the total number of words in the information body (disclosure data code words) and the number of private data code words exceeds the total number of allowed placement words. The model number of the
次に、情報本体のコード語に基づいて、開示データコード語と訂正コード語とを有するRSブロック(配置前RSブロック)が生成される(S1306)。選択されたQRコードシンボル1の型番によってはRSブロックを生成するため、情報本体のコード語が複数のブロックに分割されることもある。そして、各ブロックに対して誤り訂正コード語が生成され、生成された訂正コード語が対応するコード語の後に付加される。そして、RSブロックが生成される。なお訂正コード語の生成手法については、JIS規格に準ずることができる。
Next, based on the code word of the information body, an RS block (pre-arrangement RS block) including the disclosed data code word and the correction code word is generated (S1306). Since the RS block is generated depending on the model number of the selected
図6には、情報本体と終端符号と訂正コード語の一例が示されている(なお、パディングコード語と誤り訂正コード語は説明のための模式図でありその語数やコード内容は必ずしも実際のものとしての正確さはない)。ここでは、情報本体のコード語としてプレインなテキスト情報が示される。終端符号は、例えば、「0000」のビット列を採用することができる。そして、情報本体を含むコード語に基づいて生成されたRS符号が付加され、RSブロックが作成される。 FIG. 6 shows an example of the information body, the terminal code, and the correction code word (note that the padding code word and the error correction code word are schematic diagrams for explanation, and the number of words and the code content are not always the actual values. There is no accuracy as things). Here, plain text information is shown as a code word of the information body. As the terminal code, for example, a bit string of “0000” can be adopted. Then, the RS code generated based on the code word including the information body is added to create the RS block.
このようにして生成されたRSブロックの一部に、図7に示したような非公開データコード語が配置されることになる(S1308)。すなわち、配置前RSブロックの一部であるパディングコード語の少なくとも一部に代えて非公開データコード語を配置することにより非公開データコード語が隠蔽された配置後RSブロックを求める。 The secret datacode word as shown in FIG. 7 is arranged in a part of the RS block generated in this way (S1308). That is, a post-arrangement RS block in which a secret datacode word is hidden is obtained by arranging a secret datacode word in place of at least a part of the padding codeword that is a part of the prearrangement RS block.
図8は、RSブロックの一部に非公開データコード語を配置したときの説明図である。図8には、前述のRSブロックと、非公開データコード語が示されている。そして、図8に示されるように、本実施の形態においては、本来終端識別コード語に続くパディングコード語の少なくとも一部に代えてその先頭から秘匿識別子、データ長を表すコード語に続いて非公開データコード語が配置されることになる。 FIG. 8 is an explanatory diagram when a private datacode word is arranged in a part of the RS block. FIG. 8 shows the above-mentioned RS block and a secret datacode word. Then, as shown in FIG. 8, in the present embodiment, instead of at least a part of the padding code word that originally follows the termination identification code word, the secret identifier and the code word indicating the data length are added from the beginning to Public data code words will be placed.
このように、RSブロックの一部すなわち本来パディングコード語が置かれる位置に非公開データコード語が配置されると、標準デコーダでは、開示情報である情報本体部分は終端識別コード語までとして処理されるので配置前の情報本体部分を適切に抽出し、表示することができる。 In this way, when the private datacode word is placed in a part of the RS block, that is, the position where the padding codeword is originally placed, the standard decoder processes the information main body portion, which is the disclosure information, up to the termination identification codeword. Therefore, the information main body portion before arrangement can be appropriately extracted and displayed.
そして、非公開データコード語が配置された部分は、埋め草であるパディングコード語が配置される部位であるため無視され捨てられてしまう情報となるので、標準デコーダでは表示することができない。一方、拡張デコーダ70では、後述するように、配置後RSブロックから非公開データコード語を抽出する。このように、抽出された非公開データコード語(非公開情報)と情報本体部分(開示情報)を表示する。
Since the portion where the secret data code word is arranged is the portion where the padding code word that is the padding is arranged, it becomes information that is ignored and discarded, and therefore cannot be displayed by the standard decoder. On the other hand, the
次に、配置後RSブロックに基づいてQRコードシンボル1を作成する(S1310)。RSブロックに基づいてQRコードシンボル1を生成する手法は、JIS規格における標準的なQRコード生成手法と同様のものを採用することができる。このようにすることで、QRコードAに係るQRコードシンボル1を生成することが可能となる。
Next, a
次に、他の関連QRコードを生成するために、ステップS1302からステップS1310の手順を繰り返す(S1312)。即ち、本実施の形態では、QRコードAに係るQRコードシンボル1の生成に引き続き、同様の方法を用いてQRコードBに係るQRコードシンボル1とQRコードCに係るQRコードシンボル1を生成する。このように、本実施の形態においては、ステップS1302からステップS1310の手順からなる生成工程を複数回実行することにより複数の関連QRコードを生成する。
Next, in order to generate another related QR code, the procedure of steps S1302 to S1310 is repeated (S1312). That is, in the present embodiment, subsequent to the generation of
次に、このようにして生成されたQRコードシンボル1のデコード手法について説明する。デコードは、上述した拡張デコーダ70により行われる。拡張デコーダ70は、複数の関連QRコードを読み取って、該複数の関連QRコードが互いに関連付けられていることを評価、確認する。そして、これらの関連QRコードが互いに関連付けられていることが確認されることにより、当該関連QRコードによる管理対象(当該関連QRコードを所有している人や当該関連QRコードが添付されている物等)の真正性(正当性)を担保する(認証する)ことが可能となる。
Next, a decoding method of the
図9は、拡張デコーダ70のブロック構成図である。拡張デニーダ70は、複数の関連QRコードを読み取って、QRコードシンボル1に含まれる表示対象である開示情報と非公開情報とを展開し、さらに、該複数の関連QRコードが互いに関連付けられていることを評価する(確認する)装置である。拡張デコーダ70は、制御部71と撮像装置72と表示装置73と印刷装置74と入力装置75を備える。
FIG. 9 is a block diagram of the
制御部71は、演算部71aと記憶部71bを有する。演算部71aは中央演算装置等からなり、プログラムの実行および種々の演算を担う。記憶部71bは、プログラムの実行に際して、必要なデータの記憶を担う。特に、記憶部71bには、各種処理を実行するためのプログラムが記憶されている。
The
撮像装置72は、QRコードシンボル1を撮像するための装置であり、例えば、CCDカメラなどで構成される。
The
表示装置73は、データの入力等に際し必要な表示機能を担うものである。また、表示装置73は、QRコードから展開された情報をディスプレイ等の表示手段を介して表示する。印刷装置74も、展開された情報を印刷により紙媒体等に表示する。また、入力装置75は、データの入力および拡張デコーダ70の操作に使用される。
The
図10は、関連QRコード評価方法のフローチャートである。以下の説明において、特段のことわりがない場合、QRコードシンボル1のデコード手法は、JIS規格による手法が用いられる。
FIG. 10 is a flowchart of the related QR code evaluation method. In the following description, unless otherwise specified, the method of decoding the
また、前提として、拡張デコーダ70の記憶部71bには、所定の方法で定めることができる非公開データコード語が配置される開始位置と非公開データコード語の長さ(語数)にかかわる情報(開始位置を特定するための情報と長さ情報に関するフォーマット情報)が記憶されているものとする。同様に、開示データコード語における関連コード情報の開始位置と長さにかかわるフォーマット情報が記憶されているものと仮定する。なお、どの部分にどれ位の長さだけ非公開データコード語が配置されるか、また、パディングコード語配置部分のどの部分がどれ位の長さだけ関連コード情報で占められるかをどのように定めるかについては、任意であり、何ら本実施の形態の方法に限定されるものではない。
In addition, as a premise, the storage unit 71b of the
まず、QRコードシンボル1の読み取りが行われる(S1402)。ここでは、最初に、QRコードAに係るQRコードシンボル1を読み取ったものとする。そして、読み取ったQRコードシンボル1に基づいて、複数のRSブロックが展開される(S1404)。これら複数のRSプロックへの展開は、JIS規格に準ずるものを採用することができる。これにより、たとえば、前述の図8に示された配置後RSブロックが取得される。即ち、関連QRコードから配置後データブロックが求められることになる。
First, the
次に、取得された配置後RSブロックから所定の方法によって情報本体のコード語(開示データコード語)および非公開データコード語が抽出される(S1406)。 Next, the code word (disclosure data code word) and the private data code word of the information body are extracted from the acquired post-placement RS block by a predetermined method (S1406).
図11は、関連QRコードの非公開データコード語の抽出方法の説明図である。図11には、配置後RSブロックと非公開データコード語を示している。 FIG. 11 is an explanatory diagram of a method of extracting a secret datacode word of a related QR code. FIG. 11 shows an RS block after arrangement and a secret datacode word.
配置後RSブロックは、前述のように、QRコードシンボルを読み取り、JIS規格に準じて展開することにより取得することが可能となる。本実施の形態において、拡張デコーダ70は、記憶部71bに記億されている非公開データコード語の開始位置情報と長さ情報とに基づいて、配置後RSブロックに為ける非公開データコード語の位置を特定する。そして、特定した位置から非公開データコード語を抽出する。
As described above, the RS block after arrangement can be obtained by reading the QR code symbol and expanding it according to the JIS standard. In the present embodiment, the
図12は、関連QRコードの情報本体の取り出し方法を示している。拡張デコーダ70は、必要に応じて誤り訂正処理を行ったのち、配置後RSブロックの先頭から終端符号までの情報を抽出し、抽出したデータを情報本体とする。つまり、標準的QRコードから情報を取り出す処理と全く同一の処理によって配置後RSブロックの開示データコード語から開示情報である情報本体を取り出すことになる。
FIG. 12 shows a method of extracting the information body of the related QR code. The
次に、拡張デコーダ70は、非公開データコード語から、非公開情報と関連コード情報を取り出す。即ち、拡張デコーダ70は、記憶部71bに記憶されている関連コード情報の開始位置情報と長さ情報とに基づき、本来パディングコード語が配置される終端識別コードの後ろの部分から非公開データコード語における関連コード情報の位置を特定する。そして、特定した位置から関連コード情報を取り出すと共に、非公開データコード語の残りの情報を非公開情報とする。
Next, the
拡張デコーダ70は、関連コード情報(すなわち、識別情級と連鎖数情報と序列番号情報と指標情報)を把握(確認)する(ステップS1410)。つまり、識別情報から本QRコードが関連QRコードであることを把握(確認)すると共に、本実施の形態においては、他の3つの情報から当該関連QRコードが3つの関連QRコードのうちの1番目の関連QRコードであり、パスワードがAF(16進数)であることを把握、確認する。
The
なお、本実施の形態においては、上述した関連コード情報取り出し処理を、読み取った複数の関連QRコードの各々に対して実行し、複数の関連QRコードの各々から取得された関連コード情報に基づき、複数の関連QRコードが互いに関連づけられていることを評価する。具体的には、前記識別情報に基づいて、各々のQRコードが関連QRコードであることが確認され、複数の関連QRコードの各々から取得された連鎖数情報及び序列番号情報に基づいて、連鎖数分の互いに異なる序列番号が揃ったことが確認され、指標情報に基づいて、互いに異なる序列番号を有する連鎖数分の関連QRコードが関連付けられている(ここでは、連鎖数分の関連QRコードの指標情報(パスワード)が一致している)ことが確認された際に評価条件が満たされた際に)、複数の関連QRコードが互いに関連付けられているものと評価する。 In the present embodiment, the related code information extraction process described above is executed for each of the plurality of read related QR codes, and based on the related code information acquired from each of the plurality of related QR codes, Evaluate that a plurality of related QR Codes are related to each other. Specifically, it is confirmed that each QR code is a related QR code based on the identification information, and based on the chain number information and the sequence number information acquired from each of the plurality of related QR codes, the chain It has been confirmed that several different order numbers are arranged, and related QR codes corresponding to the number of chains having different order numbers are associated based on the index information (here, related QR codes corresponding to the number of chains). It is evaluated that a plurality of related QR codes are associated with each other (when the evaluation condition is satisfied when it is confirmed that the index information (password) of (1) is matched).
ここでは、ーつの関連QRコードのみしか読み取られていないため、当該評価工程は未だ実行されない。そして、表示装置73による表示についても何ら行われることはない。
Here, since only one related QR code is read, the evaluation step is not executed yet. Then, the display by the
次に、QRコードBを読み込むと、ステップS1402からステップS1410と同様の手順(ステップS1412からステップS1420)が実行され、開示情報、非公開情報、関連QRコード情報が取り出される(ステップS1418)。 Next, when the QR code B is read, the same procedure as the steps S1402 to S1410 (steps S1412 to S1420) is executed, and the disclosure information, the non-public information, and the related QR code information are extracted (step S1418).
拡張デコーダ70は、関連コード情報(すなわち、識別情穀と連鎖数情報と序列番号情報と指標情報)を把握、確認する(ステップS1420)。つまり、識別情報から本QRコードが関連QRコードであることを把握(確認)すると共に、本実施の形態においては、他の3つの情報から当該関連QRコードが3つの関連QRコードのうちの2番目の関連QRコードであり、パスワードがAF(16進数)であることを把握、確認する。
The
そして、当該関連コード情報と、QRコードAの関連コード情報とを照らし合わせることにより、前述した評価工程が実施される(ステップS1421)。ここでは、連鎖数分の互いに異なる序列番号が揃っておらず(つまり、3つのうちの1,2しかない)評価条件が満たされていないため、複数の関連QRコードが互いに関連付けられている旨は評価されない。そして、このような揚合には、表示装置73による表示については何ら行われない。
Then, by comparing the related code information with the related code information of the QR code A, the above-described evaluation process is performed (step S1421). Here, since the order numbers that are different from each other for the number of chains are not available (that is, there are only 1 or 2 of the 3), the evaluation condition is not satisfied, so that a plurality of related QR codes are associated with each other. Is not evaluated. Then, in such a combination, no display is performed on the
更に、QRコードCを読み込むと、ステップS1402からステップS1410と同様の手順(ステップS1422からステップS1430)が実行され、開示情報、非公開情報、関連QRコード情報が取り出される(ステップS1428)。 Further, when the QR code C is read, the same procedure as steps S1402 to S1410 (steps S1422 to S1430) is executed, and the disclosure information, the non-public information, and the related QR code information are extracted (step S1428).
拡張デコーダ70は、関連コード情報(すなわち、識別情報と連鎖数情報と序列番号情報と指標情報)を把握、確認する(ステップS1430)。つまり、識別情報から本QRコードが関連QRコードであることを把握、確認すると共に、本実施の形態においては、他の3つの情報から当該関連QRコードが3つの関連QRコードのうちの3番目の関連QRコードであり、パスワードがAF(16進数)であることを把握、確認する。
The
そして、当該関連コード情報と、QRコードA及びQRコードBの関連コードで情報と、を照らし合わせることにより、前述した評価工程が実行される(ステップS1431)。ここでは、各々のQRコードが関連QRコードであることが確認され、連鎖数分の互いに異なる序列番号が揃ったことが確認され(つまり、3つのうちの1,2,3が揃う)、互いに異なる序列番号を有する連鎖数分の関連QRコードが関連付けられている(連鎖数分の関連QRコードの指標情報(パスワード)がAFで一致している)ことが確認され、前記評価条件が満たされるため、複数の関連QRコード(QRコードA乃至QRコードC)が互いに関連付けられている旨が評価される。 Then, the above-mentioned evaluation process is executed by comparing the related code information with the information using the related codes of the QR code A and the QR code B (step S1431). Here, each QR code is confirmed to be a related QR code, and it is confirmed that different sequence numbers corresponding to the number of chains are prepared (that is, 1, 2, 3 of 3 are prepared), It is confirmed that the related QR codes corresponding to the number of chains having different order numbers are associated (the index information (password) of the related QR codes corresponding to the number of chains is matched by AF), and the evaluation condition is satisfied. Therefore, it is evaluated that a plurality of related QR codes (QR code A to QR code C) are associated with each other.
そして、本実施の形態においては、拡張デコーダ70がかかる評価をした際に、複数の関連QRコードが互いに関連付けられている旨(例えば、「認証できました」の文字)が表示装置73を介して表示される(ステップS1432)。なお、表示の代わりに、又は、表示に加えて、かかる旨を音声により報知することとしてもよい。
Then, in the present embodiment, when the
さらに、かかる際に、表示装置73は、ステップS1408、ステップS1418、ステップS1428で取り出されたQRコードA乃至QRコードCの各々の開示情報と非公開情報も表示する(ステップS1432)。なお、本実施の形態においては、図13に示すように、各々の開示情報を、関連QRコードの読み取り順ではなく、前記序列番号の順に表示し、同様に、各々の非公閧情報も前記序列番号の順に表示する。また、開示情報のグループと非公開情穀のグループがそれぞれ一塊になるように表示し、開示情報のグループの次に非公開情報のグループが続くように表示する。なお、図13は、ディスプレイに各種情報が表示された様子を示した図である。
Further, at this time, the
===本実施の形態に係るQRコード生成方法等の有効性について===
上述したとおり、本実施の形態に係るQRコード生成方法は、互いに関連付けられた複数の関連QRコードを生成するQRコード生成方法であって、非公開データコード語を求め、開示データコード語とパディングコード語と誤り訂正コード語とを有する配置前コードブロックを求め、前記配置前コードブロックのうちパディングコード語の少なくとも一部に前記非公開データコード語を配置することにより前記非公開データコード語が隠蔽された配置後コードブロックを求め、前記配置後データブロックに基づいて訂正コード語を生成付加した関連QRコードを生成する生成工程を、複数回実行することにより、前記複数の関連QRコードの各々を生成し、各々の前記生成工程において前記非公開データコード語を求める際に、前記複数の関連QRコードが互いに関連付けられていることを特定可能とするための関連コード情報を、前記非公開データコード語に含ませることとしている。
=== Effectiveness of QR code generation method and the like according to the present embodiment ===
As described above, the QR code generation method according to the present embodiment is a QR code generation method that generates a plurality of related QR codes that are associated with each other. By determining a pre-placement code block having a code word and an error correction code word, and arranging the private data code word in at least a part of padding code words in the pre-placement code block, the private data code word becomes Each of the plurality of related QR codes is obtained by performing a generation step of obtaining a concealed post-arrangement code block and generating a correction QR code based on the post-arrangement data block and generating a related QR code a plurality of times. And the related code information for making it possible to specify that the plurality of related QR codes are related to each other when generating the private data code word in each of the generating steps. It is supposed to be included in the code word.
また、本実施の形態に係る拡張エンコーダ60(QRコード生成システム)は、互いに関連付けられた複数の関連QRコードを生成する拡張エンコーダ60(QRコード生成システム)であって、非公開データコード語を求め、開示データコード語とパディングコード語と誤り訂正コード語とを有する配置前コードブロックを求め、前記配置前コードブロックのうちパディングコード語の少なくとも一部に前記非公開データコード語を配置することにより前記非公開データコード語が隠蔽された配置後コードブロックを求め、前記配置後データブロックに基づいて訂正コード語を生成付加した関連QRコードを生成する生成工程を、複数回実行することにより、前記複数の関連QRコードの各々を生成し、各々の前記生成工程において前記非公開データコード語を求める際に、前記複数の関連QRコードが互いに関連付けられていることを特定可能とするための関連コード情報を、前記非公開データコード語に含ませることとしている。 Further, the extended encoder 60 (QR code generation system) according to the present embodiment is an extended encoder 60 (QR code generation system) that generates a plurality of related QR codes associated with each other, and uses a secret datacode word as a secret datacode word. Obtaining a pre-placement code block having a disclosed data code word, a padding code word, and an error correction code word, and placing the private data code word in at least a part of the padding code word in the pre-placement code block. By performing a generation step of obtaining a post-placement code block in which the private datacode word is hidden by the above and generating a related QR code with a correction codeword generated and added based on the post-placement data block, by performing a plurality of times. A relation for making it possible to specify that the plurality of related QR codes are associated with each other when generating each of the plurality of related QR codes and obtaining the private datacode word in each of the generating steps. Code information is included in the private data code word.
また、本実施の形態に係るQRコード評価方法は、上記のQRコード生成方法により生成された複数の関連QRコードを読み取り、該複数の関連QRコードが互いに関連付けられていることを評価するQRコード評価方法であって、前記関連QRコードから前記配置後データブロックを求め、前記配置後データブロックから前記非公開データコード語を抽出し、前記非公開データコード語から前記関連コード情報を取り出す関連コード情報取り出し処理を、読み取った前記複数の関連QRコードの各々に対して実行する取り出し工程と、前記複数の関連QRコードの各々から取得された前記関連コード情報に基づいて、前記複数の関連QRコードが互いに関連付けられていることを評価する評価工程と、を有することとしている。 A QR code evaluation method according to the present embodiment reads a plurality of related QR codes generated by the above QR code generation method and evaluates that the plurality of related QR codes are associated with each other. An evaluation method, wherein the post-placement data block is obtained from the related QR code, the private datacode word is extracted from the post-placement data block, and the related code information is extracted from the private datacode word. Based on the extraction step of performing an information extraction process on each of the read plurality of related QR codes, and the plurality of related QR codes based on the related code information acquired from each of the plurality of related QR codes. And an evaluation step of evaluating that are associated with each other.
また、本実施の形態に係る拡張デコーダ70(QRコード評価システム)は、上記の拡張エンコーダ60(QRコード生成システム)により生成された複数の関連QRコードを読み取って、該複数の関連QRコードが互いに関連付けられていることを評価する拡張デコーダ70(QRコード評価システム)であって、前記関連QRコードから前記配置後データブロックを求め、前記配置後データブロックから前記非公開データコード語を抽出し、前記非公開データコード語から前記関連コード情報を取り出す関連コード情報取り出し処理を、読み取った前記複数の関連QRコードの各々に対して実行し、前記複数の関連QRコードの各々から取得された前記関連コード情報に基づいて、前記複数の関連QRコードが互いに関連付けられていることを評価することとしている。 Further, the extended decoder 70 (QR code evaluation system) according to the present embodiment reads a plurality of related QR codes generated by the extended encoder 60 (QR code generation system), and determines that the plurality of related QR codes are An extended decoder 70 (QR code evaluation system) for evaluating that they are associated with each other, wherein the post-placement data block is obtained from the related QR code, and the private datacode word is extracted from the post-placement data block. , The related code information extracting process for extracting the related code information from the private data code word is executed for each of the read related QR codes, and the related code information is acquired from each of the related QR codes. Based on the related code information, it is evaluated that the plurality of related QR codes are associated with each other.
また、本実施の形態に係る拡張管理システム(QRコード管理システム)は、互いに関連付けられた複数の関連QRコードを生成する拡張エンコーダ60(QRコード生成システム)であって、非公開データコード語を求め、開示データコード語とパディングコード語と誤り訂正コード語とを有する配置前コードブロックを求め、前記配置前コードブロックのうちパディングコード語の少なくとも一部に前記非公開データコード語を配置することにより前記非公開データコード語が隠蔽された配置後コードブロックを求め、前記配置後データブロックに基づいて訂正コード語を生成付加した関連QRコードを生成する生成工程を、複数回実行することにより、前記複数の関連QRコードの各々を生成し、各々の前記生成工程において前記非公開データコード語を求める際に、前記複数の関連QRコードが互いに関連付けられていることを特定可能とするための関連コード情報を、前記非公開データコード語に含ませる拡張エンコーダ60(QRコード生成システム)と、当該拡張エンコーダ60(QRコード生成システム)により生成された複数の関連QRコードを読み取って、該複数の関連QRコードが互いに関連付けられていることを評価する拡張デコーダ70(QRコード評価システム)であって、前記関連QRコードから前記配置後データブロックを求め、前記配置後データブロックから前記非公開データコード語を抽出し、前記非公開データコード語から前記関連コード情報を取り出す関連コード情報取り出し処理を、読み取った前記複数の関連QRコードの各々に対して実行し、前記複数の関連QRコードの各々から取得された前記関連コード情報に基づいて、前記複数の関連QRコードが互いに関連付けられていることを評価する拡張デコーダ70(QRコード評価システム)と、を備えることとしている。 Further, the extended management system (QR code management system) according to the present embodiment is an extended encoder 60 (QR code generation system) that generates a plurality of related QR codes associated with each other, and uses a secret datacode word as a secret datacode word. Obtaining a pre-placement code block having a disclosed data code word, a padding code word, and an error correction code word, and placing the private data code word in at least a part of the padding code word in the pre-placement code block. By performing a generation step of obtaining a post-placement code block in which the private datacode word is hidden by the above and generating a related QR code with a correction codeword generated and added based on the post-placement data block, by performing a plurality of times. A relation for making it possible to specify that the plurality of related QR codes are associated with each other when generating each of the plurality of related QR codes and obtaining the private datacode word in each of the generating steps. The extended encoder 60 (QR code generation system) including the code information in the secret datacode word, and the plurality of related QR codes generated by the extended encoder 60 (QR code generation system) are read, and the plurality of QR codes are read. An extended decoder 70 (QR code evaluation system) for evaluating that related QR codes are associated with each other, wherein the post-placement data block is obtained from the related QR code, and the private data code is obtained from the post-placement data block. A related code information extraction process of extracting a word and extracting the related code information from the secret data code word is executed for each of the read related QR codes, and the related code information is extracted from each of the read related QR codes. An extended decoder 70 (QR code evaluation system) for evaluating that the plurality of related QR codes are related to each other based on the acquired related code information.
このため、対象をQRコードで管理する際に真正性を担保することを、関連QRコードに係る技術を用いて、適切に実現することができる。 Therefore, ensuring the authenticity when managing the target with the QR code can be appropriately realized by using the technique related to the related QR code.
JIS規格の第9章に規定されている構造的連接QRコード等の関連QRコードは、既によく知られており、このコードを利用した技術も提案されている。しかしながら、従来は、複数の関連QRコードが互いに関連付けられていることを評価(確認、判定)することにより、当該関連QRコードによる管理対象(当該関連QRコードを所有している人や当該関連QRコードが添付されている物等)の真正性を担保する(認証する)ようなことは実施されていない。
Related QR codes such as the structurally connected QR code defined in
また、仮に、かかる事項を、構造的連接QRコードのような標準関連QRコードを用いて実施しようとする場合には、以下の問題点の発生が考えられる。 Further, if it is attempted to carry out such a matter using a standard related QR code such as a structurally connected QR code, the following problems may occur.
すなわち、標準デコーダで構造的連接QRコード(関連QRコード)のーつを読み取った際には、標準デコーダはこのQRコードが構造的連接QRコード(関連QRコード)であることを理解することができ、その旨(例えば、「次のQRコードを読み取って下さい」等のメッセージ)を表示する。従って、標準デコーダを操作する操作者は、このQRコードが通常のQRコードではなく構造的連接QRコード(関連QRコード)であることを容易に認識することが可能となる。 That is, when one of the structurally connected QR codes (related QR code) is read by the standard decoder, the standard decoder can understand that this QR code is a structurally connected QR code (related QR code). Yes, that is the case (for example, a message such as "Please read the next QR code") is displayed. Therefore, an operator who operates the standard decoder can easily recognize that this QR code is not a normal QR code but a structurally connected QR code (related QR code).
そして、このような認識行為は、当該操作者が悪徳な業者等であった場合に、当該業者等が付け入る契機となり得る。例えば、当該業者等は、この読み取った構造的連接QRコード(関連QRコード)を解析し、この構造的連接QRコード(関連QRコード)に関連付けられた他の構造的連接QRコード(関連QRコード)を偽造することができる。そして、この偽造した他の構造的連接QRコード(関連QRコード)を用いて、悪事を働く可能性が生ずる。 Then, such a recognition act can be an opportunity for the operator or the like to enter if the operator is a vicious operator or the like. For example, the trader analyzes the read structurally connected QR code (related QR code), and other structurally connected QR code (related QR code) associated with this structurally connected QR code (related QR code). ) Can be forged. Then, using this forged other structurally connected QR code (related QR code), there is a possibility that a wrong thing will be done.
これに対し、本実施の形態においては、前記事項を、標準関連QRコードではなく独自の関連QRコードを用いて行うこととし、当該独自の関連QRコードにおいては、関連コード情報を非公開データコード語に含ませることとしている。標準デコーダでは、非公開データコード語から関連コード情報を取り出せないため、標準デコーダは、本実施の形態に係るQRコードを読み取ったとしても、通常のQRコードと理解するのみで、関連QRコードであることをそもそも理解することが不可能である。従って、標準デコーダを操作する操作者は、このQRコードが通常のQRコードではなく関連QR口ードであることを認識することができない。そのため、操作者が悪徳な業者等であった場合であっても、当該業者等は前述した偽造を行う発想には至り得ない。 On the other hand, in the present embodiment, the above-mentioned matter is performed using the unique related QR code instead of the standard related QR code, and in the unique related QR code, the related code information is the private data code. It is supposed to be included in the word. Since the standard decoder cannot extract the related code information from the secret data code word, even if the standard decoder reads the QR code according to the present embodiment, the standard decoder only understands that the QR code is a normal QR code. It is impossible to understand something in the first place. Therefore, the operator who operates the standard decoder cannot recognize that this QR code is the related QR code rather than the normal QR code. Therefore, even if the operator is a vicious trader or the like, the trader or the like cannot reach the idea of performing the above-mentioned forgery.
このように、本実施の形態に係るQRコード生成方法、拡張エンコーダ70(QRコード生成システム)、QRコード評価方法、拡張デコーダ70(QRコード評価システム)、拡張管理システム(QRコード管理システム)によれば、対象をQRコードで管理する際に、関連QRコードに係る技術を用いて、真正性をより確実に担保することができる。 As described above, the QR code generation method, the extended encoder 70 (QR code generation system), the QR code evaluation method, the extended decoder 70 (QR code evaluation system), and the extended management system (QR code management system) according to the present embodiment are used. According to this, when managing the target by the QR code, the authenticity can be more surely ensured by using the technique related to the related QR code.
また、本実施の形態において、前記関連コード情報は、QRコードが関連QRコードであるか否かを示す識別情報と、互いに関連付けられた複数の関連QRコードの連鎖数を示す連鎖数情報と、前記関連コード情報を備える関連QRコードが、前記連鎖数分の関連QRコードのうちの何番目の関連QRコードであるかを示す序列番号情報と、前記関連コード情報を備える関連QRコードが、該関連QRコードと序列番号が異なる他の関連QRコードと関連付けられているか否かを判断するための指標情報と、を有することとしている。 Further, in the present embodiment, the related code information is identification information indicating whether or not a QR code is a related QR code, and chain number information indicating a chain number of a plurality of related QR codes associated with each other, The related QR code including the related code information is a sequence number information indicating the number of the related QR code among the related QR codes for the number of chains, and the related QR code including the related code information is The related QR code and index information for determining whether or not the related QR code is associated with another related QR code having a different order number.
また、前記評価工程においては、前記識別情報に基づいて、各々の前記QRコードが関連QRコードであることが確認され、前記複数の関連QRコードの各々から取得された前記連鎖数情報及び前記序列番号情報に基づいて、前記連鎖数分の互いに異なる前記序列番号が揃ったことが確認され、前記指標情報に基づいて、互いに異なる前記序列番号を有する連鎖数分の前記関連QRコードが関連付けられていることが確認された際に、前記複数の関連QRコードが互いに関連付けられていると評価することとしている。 In the evaluation step, it is confirmed that each of the QR codes is a related QR code based on the identification information, and the chain number information and the order are acquired from each of the plurality of related QR codes. Based on the number information, it is confirmed that the different order numbers corresponding to the number of chains are aligned, and based on the index information, the related QR codes corresponding to the number of chains having the different order numbers are associated with each other. When it is confirmed that the plurality of related QR codes are associated with each other, it is evaluated that they are associated with each other.
このように、本実施の形態においては、識別情報と連鎖数情報と序列番号情報と指標情報が、非公開データコード語に含まれている。つまり、偽造を行う上で必須の情報が隠蔽されているので、第三者がこの隠蔽された情報を知らなければ、偽造を行うことがよりー層難しい状況となる。したがって、本実施の形態においては、真正性をより一層確実に担保することが可能となる。 As described above, in the present embodiment, the identification information, the chain number information, the sequence number information, and the index information are included in the private datacode word. In other words, the information that is indispensable for the forgery is concealed, and it becomes even more difficult for the forgery to be made unless a third party knows the concealed information. Therefore, in the present embodiment, the authenticity can be more surely guaranteed.
また、本実施の形態においては、前記複数の関連QRコードが互いに関連付けられていると評価した際に、前記複数の関連QRコードが互いに関連付けられている旨を表示する表示工程を有することとしている。 In addition, in the present embodiment, when it is evaluated that the plurality of related QR codes are associated with each other, a display step of displaying that the plurality of related QR codes are associated with each other is provided. ..
このため、複数の関連QRコードが互いに関連付けられていることが評価(確認)され、当該関連QRコードによる管理対象の真正性が担保された(認証された)ことを拡張デコーダ70の操作者等に対し、明確に知らせることができる。
For this reason, it is evaluated (confirmed) that a plurality of related QR codes are associated with each other, and the operator of the
また、本実施の形態において、前記取り出し工程においては、必要に応じて誤り訂正処理を行ったのち、前記配置後RSブロックの先頭から終端符号までの情報を抽出し、抽出したデータを情報本体とする。つまり、標準的QRコードから情報を取り出す処理と全く同一の処理によって配置後RSブロックの開示データコード語から開示情報である情報本体を取り出すことになる。この開示情報取り出し処理を、読み取った前記複数の関連QRコードの各々に対して実行し、前記複数の関連QRコードが互いに関連付けられていると評価した際に、各々の前記開示情報を表示する表示工程を有することとしている。 Further, in the present embodiment, in the extracting step, after performing error correction processing as necessary, information from the beginning to the termination code of the post-arrangement RS block is extracted, and the extracted data is used as an information body. To do. In other words, the information body, which is the disclosure information, is extracted from the disclosure data code word of the post-placement RS block by exactly the same process as the process of extracting the information from the standard QR code. This disclosure information extraction processing is executed for each of the plurality of read related QR codes, and when it is evaluated that the plurality of related QR codes are associated with each other, a display for displaying each of the disclosure information. It has a process.
このため、拡張デコーダ70の操作者等は、複数の関連QRコードが互いに関連付けられていることが評価(確認)され、当該関連QRコードによる管理対象の真正性が担保された(認証された)ことを、開示情報の表示により知ることが可能となり、さらに、複数の関連QRコードの各々に埋め込まれてぃる追加の情報(例えば、前述の第一適用例では、診療科目、患者名、年齢、性別、血液型、薬名)を拡張デコーダ70の操作者等にまとめて提示することが可能となる。
Therefore, the operator of the
また、本実施の形態において、前記取り出し工程においては、前記非公開データコード語から非公開情報を取り出す非公開情報取り出し処理を、読み取った前記複数の関連QRコードの各々に対して実行し、前記表示工程においては、各々の前記非公開情報を表示することとしている。 Further, in the present embodiment, in the extracting step, a secret information extracting process for extracting secret information from the secret datacode word is executed for each of the plurality of read related QR codes, and In the displaying step, each of the non-public information is displayed.
このため、拡張デコーダ70の操作者等は、複数の関連QRコードが互いに関連付けられていることが評価(確認)され、当該関連QRコードによる管理対象の真正性が担保された(認証された)ことを、非公開情報の表示により知ることができ、さらに、複数の関連QRコードの各々に埋め込まれている追加の情報(例えば、前述の第一適用例では、病名、投与部寺)を拡張デコーダ70の操作者等にまとめて提示することが可能となる。
Therefore, the operator of the
また、本実施の形態において、前記表示工程においては、各々の前記開示情報を前記序列番号の順に表示し、各々の前記非公開情報を前記序列番号の順に表示することとしている。 Further, in the present embodiment, in the displaying step, the disclosure information items are displayed in the order of the order numbers, and the private information items are displayed in the order of the order numbers.
このため、関連QRコードの読み取り順に影響されることなく、所望の順番で開示情報及び非公開情報を表示することができる。 Therefore, the disclosure information and the non-public information can be displayed in a desired order without being affected by the reading order of the related QR code.
===その他の実施の形態===
上記の実施の形態は、本発明の理解を客易にするためのものであり、本発明を限定して解釈するためのものではない。本発明は、その趣旨を逸脱することなく、変更、改良され得ると共に、本発明にはその等価物が含まれることは言うまでもない。特に、以下に述べる実施形態であっても、本発明に含まれるものであることは勿論である。
=== Other Embodiments ===
The above-described embodiments are for facilitating the understanding of the present invention, and are not for limiting the interpretation of the present invention. It goes without saying that the present invention can be modified and improved without departing from the spirit thereof and that the present invention includes equivalents thereof. In particular, it goes without saying that the embodiments described below are also included in the present invention.
上記実施の形態においては、二次元コードとしてQRコードを例に挙げて説明したが、これに限定されるものではなく、他の二次元コードであっても構わない。当該他の二次元
コードとしては、例えばDataMatrix(ISO/IEC16022:2006、JIS X-0512:2015)、PDF 417 (ISO/IEC15438:2006、JIS X-0508:2010)を、挙げることができる。
In the above embodiment, the QR code has been described as an example of the two-dimensional code, but the present invention is not limited to this and other two-dimensional codes may be used. Examples of the other two-dimensional code include DataMatrix (ISO/IEC16022:2006, JIS X-0512:2015) and PDF 417 (ISO/IEC15438:2006, JIS X-0508:2010).
また、上記実施の形態においては、情報(開示情報、非公開情報が平文であることとして説明したが、暗号化されたもの(暗号文)であってもよいことは勿論である。 Further, in the above embodiment, the information (disclosure information and non-public information) is described as plain text, but it is needless to say that it may be encrypted (cipher text).
また、上記実施の形態においては、指標情報として、互いに関連付けられた複数の関連QRコードに共通のパスワードを用いることとしたが、これに限定されるものではない。例えば、JIS規格の第9.3章に規定されているパリティデータのようなものを用いてもよい。 Further, in the above-described embodiment, the common password is used as the index information for a plurality of related QR codes associated with each other, but the present invention is not limited to this. For example, data such as parity data specified in Chapter 9.3 of the JIS standard may be used.
また、指標情報が前記パスワードであり、さらに、開示情報及び非公開情報のうちの少なくとも一方が暗号文である場合(以下では、開示情報が暗号文である場合を例にとって説明する)には、以下に説明するようにしてもよい。すなわち、当該パスワードを、前記暗号文の暗号鍵を特定するためのインデックス(見出し)情報としてもよい。例えば、複数種類のパスワードの各々毎に、このパスワードに対応する鍵の組(公開鍵暗号方式であれば、拡張エンコーダ60が前記開示情報を暗号化する際の公開鍵と拡張デコーダ70が前記開示情報を復号化する際の秘密鍵)を予め決めておく。そして、あるパスワード(例えば4のAF)を使用する場合には、拡張エンコーダ60が、当該パスワード(AF)に対応する公開鍵で開示情報を暗号化する。また、拡張デコーダ70は、非公開データコード語から関連コード情殺(指標情報であるパスワード(AF))を取り出して当該パスワード(AF)に対応する秘癌鍵を選択(特定)し、この秘密鍵で開示情報を復号化することとなる。
Further, when the index information is the password, and further, at least one of the disclosure information and the non-public information is a ciphertext (hereinafter, the case where the disclosure information is a ciphertext will be described as an example), You may make it demonstrated below. That is, the password may be index (header) information for identifying the encryption key of the ciphertext. For example, for each of a plurality of types of passwords, a set of keys corresponding to the password (in the case of the public key cryptosystem, the public key used when the
上記実施の形態においては、連鎖数分の関連QRコードの指標情報(パスワード)がー致しているか否かの確認のみしか行っていない。かかる確認のみでも十分であるが、このようなパスワードと鍵とを対応させる形態とすれば、よりセキュリティを高めることができる。すなわち、仮に(改ざん等により偶然)AF以外のパスワード(BGとする)で連鎖数分の関連QRコードの指標情報が一致した場合には、BGに対応する秘密鍵が選択されることとなり開示情報の復号化が不可能となるので、事態が正常でないことが分かるようになっている。したがって、この形態では、連鎖数分の関連QRコードに係る指標情報(パスワード)が一致することだけでなく、連鎖数分の関連QRコードに係る指標情報(パスワード)がAFで一致することまで要求されることとなる。そのため、よりセキュリティを高めることができる。 In the above embodiment, only confirmation is made as to whether or not the index information (password) of the related QR code for the number of chains is correct. Although such confirmation alone is sufficient, security can be further enhanced by adopting such a form that the password and the key are associated with each other. In other words, if the index information of the related QR code for the number of chains matches with a password (assumed to be BG) other than AF (accidentally due to falsification), the private key corresponding to the BG will be selected Since it becomes impossible to decrypt, it is known that the situation is not normal. Therefore, in this form, it is required that not only the index information (password) related to the related QR code for the number of chains matches, but also the index information (password) related to the related QR codes for the number of chains match in AF. Will be done. Therefore, security can be further enhanced.
また、これと類似の手法として、電子署名を付加する手法を採用してもよい。つまり、パスワードを、前記暗号文の暗号鍵を特定するためのインデックス(見出し)情報とし、複数種類のパスワードの各々毎に、このパスワードに対応する鍵の組(拡張エンコーダ60が情報(例えば、図6のTOKYO<cr>MINATO<cr>JPN)のハッシュ値を暗号化して電子署名を作成する際の秘密鍵と拡張デコーダ70が電子署名を復号化してハッシュ値を作成する際の公開鍵)を予め決めておく。そして、あるパスワード(例えば、図3のAF)を使用する場合には、拡張エンコーダ60が、当該パスワード(AF)に対応する秘密鍵で電子署名を作成する。作成された電子署名は、例えば、図2の開示情報又は非公開情報の中に含ませる(開示情報の例であればTOKYO<cr>MINATO<cr>JPN及び電子署名が開示情報となる)また、拡張デコーダ70は、非公開データコード語から関連コード情報(指標情報であるパスワード(AF))を取り出して当該パスワード(AF)に対応する公開鍵を選択(特定)し、この公開鍵で電子署名からハッシュ値を作成する。また、情報(例えば、図6のTOKYO<cr>MINATO<cr>JPN)からもハッシュ値を作成し、双方のハッシュ値を比較する。つまりハッシュ値の一致を確認する。
Further, as a method similar to this, a method of adding a digital signature may be adopted. In other words, the password is used as index (header) information for identifying the encryption key of the ciphertext, and for each of a plurality of types of passwords, a set of keys corresponding to this password (the
仮に改ざん等により偶然AF以外のパスワード(BGとする)で連鎖数分の関連QRコードの指標情報が一致した場合には、BGに対応する公開鍵が選択されることとなり、電子署名から当該公開鍵を用いて作成されたハッシュ値と、情報(例えば、図6のTOKYO<cr>MINATO<cr>JPN)から作成されたハッシュ値とが一致せず、事態が正常でないことが分かるようになっている。したがって、この形態では、連鎖数分の関連QRコードに係る指標情報(パスワード)が一致するととだけでなく、連鎖数分の関連QRコードに係る指標情報(パスワード)がAFで一致するととまで要求されることとなる。そのため、よりセキュリティを高めることができる。 If the index information of the related QR code for the number of chains matches with a password other than AF (BG) accidentally due to tampering, etc., the public key corresponding to BG will be selected, and the publication will be made from the electronic signature. The hash value created using the key does not match the hash value created from the information (for example, TOKYO<cr>MINATO<cr>JPN in Fig. 6), and you can see that the situation is not normal. ing. Therefore, in this form, it is requested not only that the index information (password) related to the related QR code for the number of chains matches, but also that the index information (password) related to the related QR code for the number of chains matches in AF. Will be done. Therefore, security can be further enhanced.
また、上記実施の形態においては、二次元コード生成システムとして、制御部61と表示装置63と印刷装置64と入力装置65を備えるハンディ端末等の拡張エンコーダ60を例に挙げて説明したが、これに限定されるものではない。例えば、前記生成工程を実行する遠隔地に備えられたサーバーと、サーバーとデータのやり取りを行い、表示装置63、印刷装置64、入力装置65を備える端末と、からなるようにしてもよい。
Further, in the above-described embodiment, the
また、上記実施の形態においては、二次元コード評価システムとして、制御部71と撮像装置72と表示装置73と印刷装置74と入力装置75を備えるハンディ端末等の拡張デコーダ70を例に挙げて説明したが、これに限定されるものではない。例えば、前記評価工程を実行する遠隔地に備えられたサーバーと、サーバーとデータのやり取りを行い、撮像装置72、表示装置73、印刷装置74、入力装置75を備える端末から構成されることとしてもよい。また、印刷装置74が存在しないこととしても構わない。
Further, in the above embodiment, the
また、二次元コード生成システム(二次元コード評価システム)は、専用端末であってもよいし、PC、スマートフォン、携帯電話などの汎用端末に、生成(評価)工程を実行するためのソフトウェア(アプリケーション)を組み込んだものであってもよい。 The two-dimensional code generation system (two-dimensional code evaluation system) may be a dedicated terminal, or a general-purpose terminal such as a PC, smartphone, or mobile phone, which is software (application) for executing the generation (evaluation) process. ) May be incorporated.
また、特開2017-91039号公報に開示されている技術を用いて、コードブロック(RSブロック)の保護符号化を行っても構わない。このような保護符号化を行えば、関連コード情報を含んだ非公開データコード語がより秘匿化されることとなる。 Further, the code block (RS block) may be protected and encoded by using the technique disclosed in Japanese Patent Laid-Open No. 2017-91039. By performing such protection coding, the secret datacode word including the related code information is more concealed.
QRコード
以下、本発明の二次元コードの生成方法およびその読取装置において、二次元コードとしてQRコードを用いる実施形態について図を参照して説明する。なお、以下説明する各実施形態では、二次元コードの例として、QRコードを挙げるが、本発明に係る二次元コードはこれに限られることはなく、例えば、データマトリクス、マキシコード、CPコード、PDF417やRSSコンポジット等、二次元的に表示されるあらゆるコードも本発明に含まれる。
QR Code Hereinafter, an embodiment in which a QR code is used as a two-dimensional code in a two-dimensional code generating method and a reading apparatus thereof according to the present invention will be described with reference to the drawings. In each embodiment described below, a QR code is given as an example of a two-dimensional code, but the two-dimensional code according to the present invention is not limited to this, and for example, a data matrix, a maxi code, a CP code, All codes that are displayed two-dimensionally, such as PDF417 and RSS composite, are also included in the present invention.
[第1実施形態]
まず、本発明の第1実施形態に係るプリンタ10の構成を、図14を参照して説明する。なお、図14(A)には、本第1実施形態に係るプリンタ10とそれに接続されるパーソナルコンピュータ(以下「PC」という)1とを示す説明図が図示されており、また図14(B)には、プリンタ10のハードウェア構成例を示すブロック図が図示されている。
[First Embodiment]
First, the configuration of the
図14(A)に示すように、プリンタ10は、ケーブル5を介してPC1に接続されることにより、PC1から出力されて当該プリンタ10に入力される英数字、漢字や記号等の文字データ(以下これらを「印刷データ」と総称する)に基づいてQRコードを生成してラベルP等に印刷する機能を有するものである。なお、ここでいう「QRコード」とは、日本工業規格(JIS)の二次元コードシンボル−QRコード−基本仕様(JIS X 0510:2004)に従うものである。
As shown in FIG. 14A, when the
PC1は、PC本体2およびディスプレイ3により構成されており、PC本体2は、図略の、MPU、メインメモリ(主記憶装置)、ハードディスク(補助記憶装置)、入出力インタフェース、通信インタフェース、キーボード、ポインティングデバイス等からなる情報処理装置で、またディスプレイ3は、PC本体2に接続されることによりPC本体2から出力される情報を画面表示可能な情報表示装置である。
The
なお、このPC本体2には、プリンタ10のデバイスドライバがインストールされて(組み込まれて)おり、当該PC1の利用者が、QRコードとしてラベルPに印刷したい文字等を含んだ印刷データを、PC本体2からプリンタ10に対して任意に出力可能にしている。
A device driver for the
これに対し、プリンタ10は、図14(B)に示すように、主に、MPU11、メモリ12、インタフェース13、ローラ制御部14、ヘッド制御部15、ローラ17、ヘッド18等から構成されている。なお、これらは、図略のプリント配線板に実装あるいは図略のハウジング内に内装されている。
On the other hand, as shown in FIG. 14B, the
MPU11は、プリンタ10全体を制御可能なマイクロコンピュータ(以下「マイコン」という)で、メモリバスを介して接続されるメモリ12とともに情報処理装置を構成し得るもので情報処理機能を有する。このMPU11には、メモリ12のほかに、インタフェース13、ローラ制御部14やヘッド制御部15も接続されている。なお、後述するコード生成処理は、このMPU11およびメモリ12により実行される。
The
メモリ12は、半導体メモリ装置で、例えばRAM(DRAM、SRAM等)やROM(EPROM、EEPROM等)がこれに相当する。このメモリ12のうちのRAMには、前述したPC1から送られてくる文字データを蓄積するバッファ領域のほか、MPU11が算術演算や論理演算等の各処理時に利用する作業領域等も確保可能に構成されている。またROMには、後述のコード生成処理等を実行可能な所定プログラムやその他、ローラ制御部14やヘッド制御部15等の各ハードウェアを制御可能なシステムプログラム等が予め格納されている。
The
インタフェース13は、前述したPC1のPC本体2から送られてくる印刷データ等を受信可能にする入力インタフェースで、シリアルバス等を介してMPU11に接続されている。このインタフェース13を介してMPU11に入力された印刷データは、コード生成処理によって後述するように情報処理されてコード化される。
The
ローラ制御部14は、ローラ17の駆動機構(図略)を制御し得る制御装置で、シリアルバス等を介してMPU11に接続されている。これにより、MPU11から受けた制御信号に従ってローラ17の回転の開始や停止あるいは回転方向等を制御している。
The
ヘッド制御部15は、例えば、感熱用紙からなるラベルに対して任意のパターンを印刷し得るサーマルヘッドで、シリアルバス等を介してMPU11に接続されている。本実施形態では、後述のコード生成処理によって生成されたQRコードを感熱ラベルに印刷可能にするもので、前述したローラ制御部14による感熱ラベルの紙送りタイミングに同期して、QRコードを構成する位置検出パターン、タイミングパターンやデータコード等を当該ラベルに印刷する。
The
なお、以下、ヘッド制御部15として、サーマルヘッドの場合を例示して説明するが、QRコードを印刷できるものであれば、例えば、インクジェット用やドットインパクト用のヘッドでも良いし、また印刷機構として、レーザプリンタやLEDプリンタ等であっても良い。
The
このようにプリンタ10を構成することによって、PC1から出力されて当該プリンタ10に入力された印刷データは、インタフェース13を介してメモリ12のバッファ領域に一旦蓄えられた後、次に説明するコード生成処理に渡される。ここで、コード生成処理を図15〜図17を参照して説明する。なお、図15には、コード生成処理の流れを示すフローチャートが図示されている。また図16には、図15に示すコード生成処理により情報処理されるデータやコードのフォーマット例が図示されている。さらに図17には、1型のQRコードの構成例が図示されている。
By configuring the
図15に示すように、コード生成処理は、プリンタ10の電源投入により起動するMPU11およびメモリ12によって開始され、まずステップS101により初期設定処理が行われる。この処理は、メモリ12の作業領域や印刷データを蓄えるバッファ領域をクリアし、或いは所定のフラグやカウンタ等をクリアする。
As shown in FIG. 15, the code generation process is started by the
ステップS103では、印刷データを受信したか否かを判断する処理で、印刷データを受信するまで、このステップを繰り返す(S103;No)。そして、印刷データを受信したと判断すると(S103;Yes)、続くステップS105によりタイマーのカウント値をクリアする処理を行う。このステップS105でカウンタ値がクリアされるタイマーは、次のステップS107により所定時間の経過を計時するものである。 In step S103, it is a process of determining whether or not the print data is received, and this step is repeated until the print data is received (S103; No). When it is determined that the print data has been received (S103; Yes), a process of clearing the count value of the timer is performed in the subsequent step S105. The timer whose counter value is cleared in step S105 measures the elapse of a predetermined time in the next step S107.
ステップS107では、先のタイマーにより所定時間が経過したか否かを判断する処理が行われる。即ち、PC1から送られてくる印刷データに、暗号化等に関するデータが含まれているか否かを次のステップS111により判断する必要上、例えば、所定時間として1秒間が経過したか否かを判断し、この時間が経過するまでに、PC1から暗号化に関するデータが送られてこない場合には、所定時間の経過とともにステップS109に処理を移行する(S107;Yes)。
In step S107, a process of determining whether or not a predetermined time has elapsed is performed by the previous timer. That is, it is necessary to judge in the next step S111 whether or not the print data sent from the
これに対し、所定時間が経過していない場合には(S107;No)、次のステップS111により暗号化等に関するデータとして、秘匿する必要のあるデータ(以下「非公開データ」という)のデータレコード中の位置関係を示す非公開データ位置情報と暗号するために用いる暗号キー(暗号鍵)とを受信したかどうかを判断する処理が行われる。そして、これらを受信していると判断した場合には(S111;Yes)、続くステップS113に処理を移行し、これらを受信していると判断できない場合には(S111;No)、前述したステップS107に処理を戻して、再度、時間の経過を判断する。 On the other hand, when the predetermined time has not elapsed (S107; No), the data record of the data that needs to be concealed (hereinafter referred to as "private data") as the data related to the encryption in the next step S111. A process of determining whether or not the private data position information indicating the internal positional relationship and the encryption key (encryption key) used for encryption are received. When it is determined that these are received (S111; Yes), the process proceeds to the subsequent step S113, and when it is not determined that these are received (S111; No), the above-mentioned steps are performed. The process is returned to S107, and the elapse of time is determined again.
そして、所定時間が経過したとステップS107により判断した場合には(S107;Yes)、ステップS109により所定のフラグに「0」をセットする。このフラグは、印刷データに非公開データが含まれているかどうかを示すもので、「0」がセットされている場合には、非公開データが含まれていないことを意味し、「1」がセットされている場合には、非公開データが含まれていることを意味する。このため、ステップS111により暗号化等に関するデータを受信していると判断した場合には(S111;Yes)、続くステップS113によりこのフラグに「1」をセットする処理が行われる。 When it is determined in step S107 that the predetermined time has elapsed (S107; Yes), "0" is set in the predetermined flag in step S109. This flag indicates whether or not the print data includes non-public data. When "0" is set, it means that non-public data is not included, and "1" is set. If set, it means that private data is included. Therefore, if it is determined in step S111 that the data related to encryption or the like is received (S111; Yes), the process of setting "1" to this flag is performed in the following step S113.
ステップS113により所定のフラグに「1」をセットすると、続くステップ115により、開示データおよび非公開データを並び替える処理が行われる。即ち、印刷データに、第三者に開示するデータ(開示データ)と、第三者には秘密にして隠しておきたいデータ(非公開データ)と、が含まれており、これらがデータレコード中で混在している場合に、ステップS111により受信した「非公開データのデータレコード中の位置関係を示す位置情報」に基づいて、データの順番を入れ替えて、開示データの集まりと非公開データの集まりとに分類する処理を行う。 When "1" is set to the predetermined flag in step S113, the process of rearranging the disclosure data and the non-public data is performed in the following step 115. That is, the print data includes data to be disclosed to a third party (disclosure data) and data that the third party wants to keep secret (hidden data), and these are included in the data record. , The data order is changed based on the “position information indicating the positional relationship in the data record of the private data” received in step S111, and the collection of the disclosure data and the collection of the private data are performed. Performs a process of classifying into and.
例えば、図16(A)に示すように、例えば、PC1から送られてくる印刷データのレコードに、開示データA、非公開データα、開示データB、非公開データβの順に並ぶデータが含まれていたとすると、ステップS115により、これらのデータの順番を入れ替えて図16(B)に示すように、開示データA、開示データB、非公開データα、非公開データβの順に並び替える処理を行う。これにより、開示データと非公開データとがそれぞれまとめられるので、後のステップ121による終端識別コードの付加処理や、ステップS125による秘匿識別コードの付加処理等が容易になる。
For example, as shown in FIG. 16A, for example, a record of print data sent from the
次のステップS117では、開示データや非公開データ等の各データをJISの基本仕様(JIS X 0510:2004)に従って符号化する処理が行われる。これにより、開示するデータを表すコード語としてコード化された開示データコードが生成され、また秘匿するデータを表すコード語としてコード化された非公開データコードが生成される。 In the next step S117, a process of encoding each data such as disclosed data and non-public data according to the JIS basic specifications (JIS X 0510:2004) is performed. As a result, the disclosed data code encoded as the code word representing the disclosed data is generated, and the private data code encoded as the code word representing the confidential data is generated.
また続くステップS119では、開示データの各データに対する誤り訂正符号をJISの基本仕様(JIS X 0510:2004)に準拠して生成しさらにそれをコード化して誤り訂正コードを生成する処理が行われる。また、非公開データについても、例えば、開示データと同様に、JISの基本仕様(JIS X 0510:2004)に記載されている誤り訂正コードの生成アルゴリズムを用いて誤り訂正符号を生成しそれをコード化して誤り訂正コードを生成する処理が行われる。 In subsequent step S119, an error correction code for each piece of disclosed data is generated in accordance with JIS basic specifications (JIS X 0510:2004), and is further coded to generate an error correction code. For private data, for example, like the disclosed data, an error correction code is generated using the error correction code generation algorithm described in the JIS basic specification (JIS X 0510:2004), and the code is generated. Processing to generate the error correction code.
そして、続くステップS121により、開示データコードの後に終端識別コードを付加する処理が行われる。終端識別コードは、例えば、4ビットパターンで「0000」であり、図16(C)に示すように、開示データコードAの後に続く開示データコードBの直後に位置する。なお、図16(C)では、便宜上、開示データコードを「開示コード」、終端識別コードを「終端子」、とそれぞれ表現している。 Then, in a succeeding step S121, a process of adding the termination identification code after the disclosed data code is performed. The termination identification code is, for example, “0000” in a 4-bit pattern, and is located immediately after the disclosure data code B that follows the disclosure data code A, as shown in FIG. Note that in FIG. 16C, for convenience, the disclosure data code is expressed as “disclosure code”, and the termination identification code is expressed as “terminator”.
次のステップS123では、前述した所定のフラグが「1」にセットされているか否か、即ち非公開データが含まれているか否かを判断する処理が行われる。そして、非公開データが含まれている場合には(フラグが「1」にセットされている場合:S123;Yes)、ステップS125に処理を移行し、また非公開データが含まれていない場合には(フラグが「0」にセットされている場合:S123;No)、一連の秘匿処理(S125〜S133)を飛ばしてステップS135に処理を移行する。 In the next step S123, processing is performed to determine whether or not the above-mentioned predetermined flag is set to "1", that is, whether or not private data is included. If the non-public data is included (when the flag is set to “1”: S123; Yes), the process proceeds to step S125, and when the non-public data is not included. (When the flag is set to “0”: S123; No), the series of concealment processes (S125 to S133) are skipped and the process proceeds to step S135.
ステップS125〜S133は、印刷データに非公開データが含まれている場合に行われる一連の秘匿処理である。まず、ステップS125により、秘匿識別コードを終端識別コードの直後に付加する処理が行われる。 Steps S125 to S133 are a series of confidential processing performed when the print data includes private data. First, in step S125, a process of adding the confidential identification code immediately after the termination identification code is performed.
このステップS125による処理は、秘匿識別コードを終端識別コードの直後に配置することで、この終端識別コードの後に配置されているデータコードが「秘匿するデータを表すコード語としてコード化されたものであること」を明示的に表す。これにより、本コード生成処理によって生成されたQRコードQを、QRコードリーダ等のデコードする際に、当該QRコードQに非公開データコードが含まれていることを認識可能にするので、例えば、読取対象外のデータやデータ化けしたデータ等を非公開データコードと誤認して読み取ることを防ぎ、またこれに起因する誤動作の発生を防止することもできる。 In the processing in step S125, the confidential identification code is arranged immediately after the terminal identification code, so that the data code arranged after the terminal identification code is coded as "code word representing confidential data". "There is something". As a result, when the QR code Q generated by this code generation processing is decoded by a QR code reader or the like, it can be recognized that the QR code Q includes a private data code. It is possible to prevent data that is not read, garbled data, and the like from being mistakenly recognized as a private data code and to be read, and it is also possible to prevent malfunction due to this.
次のステップS127では、非公開データコードのデータ長を計算して求め、このデータ長をコード化したものを秘匿識別コードの直後に付加する処理が行われる。これにより、非公開データコードが配置される領域や範囲がわかるので、本コード生成処理によって生成されたQRコードQを、QRコードリーダ等のデコードする際に、どこまでが非公開データコードであるか、または暗号データコードであるかを認識可能にする。 In the next step S127, the data length of the secret data code is calculated and obtained, and a coded version of this data length is added immediately after the secret identification code. By this, the area and range where the private data code is arranged can be known. When the QR code Q generated by this code generation processing is decoded by the QR code reader, etc., how much is the private data code. , Or whether it is an encrypted data code.
例えば、図16(C)に示す例では、非公開データコードαのデータ長と非公開データコードβのデータ長との和が当該データ長として計算されて秘匿識別コードの直後に付加される。なお、図16(C)では、便宜上、秘匿識別コードを「秘匿識別子」、と表現している。 For example, in the example shown in FIG. 16C, the sum of the data length of the private data code α and the data length of the private data code β is calculated as the data length and added immediately after the confidentiality identification code. Note that, in FIG. 16C, the secret identification code is expressed as “secret identifier” for convenience.
続くステップS129では、暗号キーがあるか否かを判断することによって、非公開データコードを暗号化する必要があるか否かを判断する。即ち、ステップS111によって暗号キーをPC1から受信している場合には、暗号キーがあるので(S129;Yes)、ステップS131に移行して暗号化処理を行う。これに対して、ステップS111によって暗号キーをPC1から受信していない場合には、暗号キーがないので(S129;No)、ステップS131による暗号化処理を飛ばしてステップS133に移行する。
In a succeeding step S129, it is determined whether or not the private data code needs to be encrypted by determining whether or not there is an encryption key. That is, when the encryption key is received from the
なお、ステップS111により暗号キーを受信していない場合であっても、PC1が予め暗号キーをメモリ12やハードディスク等の情報記憶媒体に保持しているときには暗号キーがあるので(S129;Yes)、ステップS131で暗号化処理を行う。
Even if the encryption key is not received in step S111, since the encryption key is present when the
ステップS131では、非公開データコードを暗号化する処理が行われる。この処理は、例えば、公知の視覚復号型暗号技術(視覚復号型秘密分散法)を用いて非公開データコードを暗号化する。これにより、この暗号化されていない平文データが付加されている場合に比べてセキュリティの強度を高めることができる。 In step S131, a process of encrypting the private data code is performed. In this processing, for example, the secret data code is encrypted by using a known visual decryption encryption technology (visual decryption secret sharing method). As a result, the strength of security can be increased as compared with the case where the plaintext data that is not encrypted is added.
例えば、図16(D)に示す例では、非公開データコードαを構成する「暗号化データ」の部分が暗号化され、「開始桁」、「文字数」及び「復号キー検査データ」も併せて生成される。最初に位置する「開始桁」は、当該暗号化された非公開データの位置情報として、印刷データの先頭をゼロ番地とした場合に表現可能なアドレス値がこれに相当する。また次の「文字数」は、暗号化されている非公開データの文字数である。これにより、コード語としてコード化される前のデータレコード中の位置関係において前後して混在する場合においても、本コード生成処理によって生成されたQRコードQを、QRコードリーダ等のデコードする際において、デコードしたデータをこの位置情報に基づいてコード化前の位置関係に配置することが可能となる。 For example, in the example shown in FIG. 16(D), the "encrypted data" portion of the private data code α is encrypted, and the "start digit", "character number", and "decryption key check data" are also Is generated. The "start digit" located first corresponds to an address value that can be expressed when the head of the print data is the zero address as the position information of the encrypted secret data. The next "character number" is the number of characters of the private data that has been encrypted. As a result, even when the positional relationship in the data record before being coded as a code word is mixed before and after, the QR code Q generated by this code generation processing is decoded by a QR code reader or the like. It is possible to arrange the decoded data in the positional relationship before encoding based on this positional information.
最後に付加されている「復号キー検査データ」は、当該暗号を解読するのに用いる復号キーを特定可能な鍵特定情報で、暗号方式が暗号キーと復号キーとが同じ共通鍵暗号方式(「秘密鍵暗号方式」ともいう)の場合には、当該復号キー検査データは暗号キーも特定できる。これにより、本コード生成処理によって生成されたQRコードQを、QRコードリーダ等でデコードする際に、非公開データコードの復号キー(復号できる鍵)を容易に特定したり、復号キーであるか否かを判断することができる。 The "decryption key check data" added at the end is key identification information that can identify the decryption key used to decrypt the encryption, and the common key cryptosystem ("" In the case of “private key encryption method”), the decryption key inspection data can also specify the encryption key. Thus, when the QR code Q generated by this code generation processing is decoded by a QR code reader or the like, it is possible to easily specify the decryption key (decryptable key) of the private data code, and whether it is the decryption key. It is possible to judge whether or not.
なお、非公開データコードβについても非公開データコードαと同様に構成され、「復号キー検査データ」として、非公開データコードαを復号する復号キーと同じ情報を付加してもよいし、また非公開データコードαの暗号キーとは異なった他の暗号キーで非公開データコードβの非公開データを暗号化した場合には、他の復号キーを特定する「復号キー検査データ」を付加してもよい。これにより、本コード生成処理によって生成されたQRコードQを、QRコードリーダ等のデコードする際に、各非公開データコードごとに復号できる鍵を容易に特定したり、復号できる鍵であるか否かを判断することができる。 The private data code β is configured in the same manner as the private data code α, and the same information as the decryption key for decoding the private data code α may be added as “decryption key check data”. If the private data of private data code β is encrypted with another encryption key different from the private key of private data code α, add “decryption key check data” to identify the other decryption key. May be. Thus, when the QR code Q generated by this code generation processing is decoded by a QR code reader or the like, a key that can be decrypted for each private data code can be easily specified, and whether or not the key can be decrypted. You can judge.
ステップS133では、データ長の直後に非公開データコードを付加する処理が行われる。図16(D)に示す例では、非公開データコードαおよび非公開データコードβをデータ長の後に付加する。このとき、この非公開データコードには、関連コード情報を配置しておく。これにより、一般仕様の二次元コードの読取装置では、二次元コードのデコード処理において、終端識別コードの後に配置されるパディングコード等は読み取りの対象にしないため、このように終端識別コードの後に配置された非公開データコードは読み取ることはできない。したがって、このような非公開データコードが含まれる二次元コードを一般仕様の読取装置で読み取っても、当該非公開データコードの存在はわからないので、当該読取装置の利用者には非公開データの存在を認識させないようにすることができる。 In step S133, a process of adding a secret data code immediately after the data length is performed. In the example shown in FIG. 16D, the secret data code α and the secret data code β are added after the data length. At this time, related code information is placed in this private data code. As a result, in the general-purpose two-dimensional code reading device, the padding code or the like placed after the end identification code is not a target for reading in the decoding process of the two-dimensional code. The private data code provided cannot be read. Therefore, even if a two-dimensional code including such non-public data code is read by a general-purpose reading device, the existence of the non-public data code cannot be known. Can be prevented from being recognized.
続くステップS135では、例えば、JISの基本仕様(JIS X 0510:2004)に記載されている処理アルゴリズムに準拠して、非公開データコードの後にパディングコードを付加する処理が行われ、さらにステップS137では、誤り訂正コード語であるRS符号を付加する処理が行われる。これにより、図16(C)に示すフォーマットのデータコードを生成することが可能となる。 In the following step S135, for example, in accordance with the processing algorithm described in the JIS basic specification (JIS X 0510:2004), a process of adding a padding code after the private data code is performed, and in step S137. A process of adding an RS code that is an error correction code word is performed. As a result, it becomes possible to generate the data code in the format shown in FIG.
また、ステップS139では、ステップS137により生成されたデータコードに基づいて、各セルを生成し、図17に示すデータブロックに配置する処理が行われる。即ち、図17に示す1型のQRコードでは、1辺が21セル(モジュール)の正方形状に構成されているため、三隅に設けられている位置検出パターンや形式情報(図17に示す斜線部分)、さらにはタイミングパターンを除いたコード領域に、8個のセルを4行2列に配置して構成されるデータブロックを26ブロック(A0〜A25)配置する。
Further, in step S139, a process of generating each cell based on the data code generated in step S137 and arranging the cells in the data block shown in FIG. 17 is performed. That is, since the
例えば、図16(C)に示す例では、開示データコードAをA0〜A2、開示データコードBをA3〜A6に配置し、終端識別コードをA7に配置する。そして、この終端識別コードの後方で、通常はパディングコードが配置される位置に相当するA8〜A17に、秘匿識別コード、データ長、非公開データコード等を配置する。 For example, in the example shown in FIG. 16C, the disclosure data code A is arranged in A0 to A2, the disclosure data code B is arranged in A3 to A6, and the termination identification code is arranged in A7. Then, behind the end identification code, a secret identification code, a data length, a secret data code, and the like are arranged in A8 to A17, which usually correspond to the positions where the padding code is arranged.
即ち、A8に秘匿識別コードを配置し、その後のA9にデータ長を配置して、さらにこの後のA10〜A13に非公開データコードα、A14〜A17に非公開データコードβをそれぞれ配置する。そして、通常のQRコードと同様に、誤り訂正コード語であるRS符号を最後のA20〜A25に配置して、この間の空いている部分であるA18〜A19にパディングコードを配置する。なお、A15およびA18は、タイミングパターンを挟んで位置していることから、A15はA15とA15’とに、またA18はA18とA18’とに分割されている。 That is, the confidential identification code is placed in A8, the data length is placed in A9 after that, and the private data code α is placed in A10 to A13 and the private data code β is placed in A14 to A17. Then, like the normal QR code, the RS code which is the error correction code word is arranged in the last A20 to A25, and the padding code is arranged in the empty portion A18 to A19. Since A15 and A18 are located with the timing pattern in between, A15 is divided into A15 and A15', and A18 is divided into A18 and A18'.
なお、ステップS131において、図16(E)に示すように、「復号キー検査データ」に代えて、復号キーそのものを付加してもよい。これにより、本コード生成処理によって生成されたQRコードQを、QRコードリーダ等のデコードする際に、例えば、当該QRコードリーダ等が非公開データコードαの復号キーを持っていなくても、非公開データコードαを復号して元の平文に戻すことができる。 In step S131, the decryption key itself may be added instead of the "decryption key check data" as shown in FIG. As a result, when the QR code Q generated by this code generation processing is decoded by the QR code reader or the like, even if the QR code reader or the like does not have the decryption key of the private data code α, The public data code α can be decrypted and returned to the original plaintext.
また、非公開データコードβについても、同様に「復号キー検査データ」に代えて、復号キーそのものを付加してもよい。付加する復号キーは、非公開データコードαを復号する復号キーと同じものを付加してもよいし、また非公開データコードαの暗号キーとは異なった他の暗号キーで非公開データコードβの非公開データを暗号化した場合には、この他の暗号キーに対応する他の復号キーを付加してもよい。これにより、本コード生成処理によって生成されたQRコードQを、QRコードリーダ等のデコードする際に、当該QRコードリーダ等が、各非公開データコードごとに対応するそれぞれの復号キーを持っていなくても、それぞれの非公開データコードを復号して元の平文に戻すことができる。 Similarly, for the private data code β, the decryption key itself may be added instead of the “decryption key check data”. The decryption key to be added may be the same as the decryption key for decrypting the private data code α, or may be another cryptographic key different from the cryptographic key of the private data code α. When the non-public data is encrypted, another decryption key corresponding to this other encryption key may be added. As a result, when the QR code Q generated by this code generation processing is decoded by the QR code reader or the like, the QR code reader or the like does not have a decryption key corresponding to each private data code. However, each private data code can be decrypted and returned to the original plaintext.
また、ステップS123により、非公開データが含まれていないと判断した場合であっても(フラグが「0」にセットされている場合:S123;No)、図16(F)に示すように、暗号化していない平文データの前に、ステップS131で付加した「開始桁」や「文字数」を付加する処理ステップを、ステップS123とステップS135との間に設けてもよい。これにより、コード語としてコード化される前のデータレコード中の位置関係において前後して混在する場合であっても、本コード生成処理によって生成されたQRコードQを、QRコードリーダ等のデコードする際において、デコードしたデータをこの位置情報に基づいてコード化前の位置関係に配置することが可能となる。また、ステップS139の後は、ステップS139´へ移行し、互いに関連させる全ての二次元コードの生成が終了したか否かを判別する。その結果、互いに関連させる全ての二次元コードの生成が終了した場合には処理動作が終了となる。一方、互いに関連させる全ての二次元コードの生成が終了していない場合には、再びステップS101に戻り、上述した処理動作を繰り返す。 Further, even when it is determined in step S123 that the private data is not included (when the flag is set to “0”: S123; No), as shown in FIG. A processing step of adding the “start digit” and the “number of characters” added in step S131 may be provided before the unencrypted plaintext data between step S123 and step S135. As a result, the QR code Q generated by this code generation processing is decoded by the QR code reader or the like even when the positional relationship in the data record before being coded as a code word is mixed before and after. At this time, it becomes possible to arrange the decoded data in the positional relationship before encoding based on this positional information. Further, after step S139, the process proceeds to step S139', and it is determined whether or not the generation of all the two-dimensional codes associated with each other has been completed. As a result, the processing operation ends when the generation of all the two-dimensional codes associated with each other ends. On the other hand, when the generation of all the two-dimensional codes associated with each other has not been completed, the process returns to step S101 again and the above-described processing operation is repeated.
以上説明したように、本第1実施形態に係るプリンタ10によると、MPU11により実行されるコード生成処理によって生成されるQRコードQでは、ステップS133により非公開データコードが、パディングコードの一部または全部に代えて、終端識別コードの後に配置されている。これにより、終端識別コードの後に配置された非公開データコードは、一般仕様の読取装置では読み取りの対象にならないので、このような非公開データコードが含まれる二次元コードを一般仕様の読取装置で読み取っても、当該非公開データコードによって秘匿しようとするデータの存在はわからない。したがって、一般仕様の読取装置の利用者には非公開データの存在を認識させないようにすることができる。
As described above, according to the
よって、このような非公開データコードを含んでいても、一般仕様の読取装置には当該非公開データコードのデコードデータに相当するものが画面表示されないので、利用者に非公開データの存在を認識させることがなく、当該利用者に対して不信感を与えたり、解読を試みようとする不用意な動機を与えることがない。また、当該非公開データコードのデコードデータに相当するものが制御データ等であっても、それが画面表示されることがないので、画面表示が乱れることもない。 Therefore, even if such a non-public data code is included, the equivalent of the decoded data of the non-public data code is not displayed on the screen of the general-purpose reading device, so that the user recognizes the existence of the non-public data. It does not cause the user to feel distrust or inadvertently try to decipher the user. Further, even if the control data or the like corresponds to the decoded data of the secret data code, it is not displayed on the screen, so that the screen display is not disturbed.
なお、上述した第1実施形態では、プリンタ10により、ラベルPにQRコードQを印刷する例を挙げて説明したが、本発明はこれに限られることはなく、QRコードQを視覚的に表現可能なものであればよく、例えば、図15に示すコード生成処理をPC本体2により実行してディスプレイ3にQRコードQを表示するように構成しても良い。この場合、コード生成処理は、コンピュータプログラムとして概念できるので、例えば、「開示するデータを表すコード語としてコード化された開示データコードの総数が、コード語を配置すべきコード領域に収容可能な容量に満たない場合、前記コード領域に配置された前記開示データコードがなすコード列の終端を示す終端識別コードをこのコード列の最後に配置するとともに、前記コード領域の空き部分にデータを表さないパディングコードを配置する二次元コードの生成装置として、コンピュータを機能させるためのプログラムであって、秘匿するデータを表すコード語としてコード化された非公開データコードを前記パディングコードの一部または全部に代えて、前記終端識別コードの後に配置することを特徴とする二次元コードの生成プログラム。」と表現可能な技術的思想を把握できる。これにより、この二次元コードの生成プログラムにより二次元コードの生成装置として機能するコンピュータは、上述したプリンタ10のMPU11等と同様の作用効果を奏する。
In the first embodiment described above, an example in which the
また、上述した第1実施形態では、プリンタ10にPC1を接続して当該PC1から印刷データを送る構成を例示して説明したが、英数字、漢字や記号等の文字データを出力可能な情報処理装置であれば、このような機能を備えたデジタルカメラや携帯電話機、あるいはハンドヘルドコンピュータやハンディターミナル等を、プリンタ10に接続する構成を採っても上述した作用効果を得ることができる。
Further, in the above-described first embodiment, the configuration in which the
[第2実施形態]
次に、本発明の第2実施形態に係るリーダ20の構成を説明する。本第2実施形態に係るリーダ20は、第1実施形態で説明したプリンタ10により印刷されたQRコードQをデコード可能なリーダ20である。なお、リーダ20によりデコード可能なQRコードQの構成は、図16および図17を参照して既に説明しているので、ここでは説明を割愛する。
[Second Embodiment]
Next, the configuration of the
まず、本発明の第2実施形態に係るリーダ20の構成を図18を参照して説明する。なお、図18には、本第2実施形態に係るQRコードリーダのハードウェア構成例を示すブロック図が図示されている。
First, the configuration of the
図18に示すように、リーダ20は、主に、照明光源21、受光センサ23、結像レンズ27等の光学系と、メモリ35、制御回路40、操作スイッチ42、液晶表示器46等のマイコン系と、電源スイッチ41、バッテリ49等の電源系と、から構成されている。なお、これらは、図略のプリント配線板に実装あるいは図略のハウジング内に内装されており、ハードウェア的には一般仕様のQRコードリーダ(読取装置)と同様に構成されている。
As shown in FIG. 18, the
光学系は、照明光源21、受光センサ23、結像レンズ27等から構成されている。照明光源21は、照明光Lfを発光可能な照明光源として機能するもので、例えば、赤色のLEDとこのLEDの出射側に設けられる拡散レンズ、集光レンズ等とから構成されている。本第2実施形態では、受光センサ23を挟んだ両側に照明光源21が設けられており、図略のケースの読取口を介してラベルPに向けて照明光Lfを照射可能に構成されている。このラベルPには、第1実施形態で詳述したQRコードQが印刷されている。
The optical system includes an
受光センサ23は、ラベルPやQRコードQに照射されて反射した反射光Lrを受光可能に構成されるもので、例えば、C−MOSやCCD等の固体撮像素子である受光素子を2次元に配列したエリアセンサ等である。受光センサ23は、結像レンズ27を介して入射する入射光をこの受光面23aで受光可能に図示しないプリント配線板に実装されている。
The
結像レンズ27は、外部から読取口を介して入射する入射光を集光して受光センサ23の受光面23aに像を結像可能な結像光学系として機能するもので、例えば、鏡筒とこの鏡筒内に収容される複数の集光レンズとにより構成されている。
The
次に、マイコン系の構成概要を説明する。マイコン系は、増幅回路31、A/D変換回路33、メモリ35、アドレス発生回路36、同期信号発生回路38、制御回路40、操作スイッチ42、LED43、ブザー44、液晶表示器46、通信インタフェース48等を備えている。このマイコン系は、その名の通り、マイコンとして機能し得る制御回路40およびメモリ35と中心に構成される。
Next, an outline of the configuration of the microcomputer system will be described. The microcomputer system includes an
光学系の受光センサ23から出力される画像信号は、増幅回路31に入力されることで所定ゲインで増幅された後、A/D変換回路33に入力されると、アナログ信号からディジタル信号に変換される。そして、ディジタル化された画像信号、つまり画像データは、メモリ35に入力されると、画像データ蓄積領域に蓄積される。なお、同期信号発生回路38は、受光センサ23およびアドレス発生回路36に対する同期信号を発生可能に構成されており、またアドレス発生回路36は、この同期信号発生回路38から供給される同期信号に基づいて、メモリ35に格納される画像データの格納アドレスを発生可能とされている。
The image signal output from the
メモリ35は、半導体メモリ装置で、例えばRAM(DRAM、SRAM等)やROM(EPROM、EEPROM等)がこれに相当する。このメモリ35のうちのRAMには、前述した画像データ蓄積領域のほかに、制御回路40が算術演算や論理演算等の各処理時に利用する作業領域等も確保可能とされている。またROMには、後述するデコード処理等を実行可能な所定プログラムやその他、照明光源21、受光センサ23等の各ハードウェアを制御可能なシステムプログラム等が予め格納されている。
The
制御回路40は、リーダ20全体を制御可能なマイコンで、CPU、システムバス、入出力インタフェース等からなり、メモリ35とともに情報処理装置を構成し得るもので情報処理機能を有する。この制御回路40には、内蔵された入出力インタフェースを介して種々の入出力装置と接続可能に構成されており、本第2実施形態の場合、電源スイッチ41、操作スイッチ42、LED43、ブザー44、液晶表示器46、通信インタフェース48等が接続されている。
The
これにより、例えば、電源スイッチ41や操作スイッチ42の監視や管理、またインジケータとして機能するLED43の点灯・消灯、ビープ音やアラーム音を発生可能なブザー44の鳴動のオンオフ、さらには読み取ったQRコードQによるコード内容を画面表示可能な液晶表示器46の画面制御や外部装置とのシリアル通信を可能にする通信インタフェース48の通信制御等を可能にしている。なお、通信インタフェース48に接続される外部装置には、当該リーダ20の上位システムに相当するホストコンピュータHST等が含まれる。
Thereby, for example, monitoring and management of the
電源系は、電源スイッチ41、バッテリ49等により構成されており、制御回路40により管理される電源スイッチ41のオンオフによって、上述した各装置や各回路に、バッテリ49から供給される駆動電圧の導通や遮断が制御されている。なお、バッテリ49は、所定の直流電圧を発生可能な二次電池で、例えば、リチウムイオン電池等がこれに相当する。また、バッテリ49によることなく、例えば、通信インタフェース48を介して接続されるホストコンピュータHST等の外部装置から電力供給を受ける構成を採用する場合もあり、この場合には当該バッテリ49は不要となる。
The power supply system includes a
このようにリーダ20を構成することによって、例えば、電源スイッチ41がオンされて所定の自己診断処理等が正常終了し、QRコードQの読み取りが可能な状態になると、照明光Lfの発光を指示する操作スイッチ42(例えばトリガースイッチ)の入力を受け付ける。これにより、利用者がトリガースイッチを引いてオンにすることで、制御回路40が同期信号を基準に照明光源21に発光信号を出力するので、当該発光信号を受けた照明光源21は、LEDを発光させて照明光Lfを照射する。
By configuring the
すると、QRコードQに照射された照明光Lfが反射し、その反射光Lrが読取口を介して結像レンズ27に入射するため、受光センサ23の受光面23aには、QRコードQの像が結像される。その結果、QRコードQの像が受光センサ23を露光するため、上述したマイコン系によって画像処理された当該QRコードQの画像データが、メモリ35の画像データ蓄積領域を介して、次に説明するデコード処理に渡される。
Then, the illumination light Lf applied to the QR code Q is reflected, and the reflected light Lr is incident on the
次に、デコード処理を図17,図19および図20を参照して説明する。なお、図19には、デコード処理の流れを示すフローチャートが図示されている。また図20には、図19に示す復号化処理の流れを示すフローチャートが図示されている。また、図17には、1型のQRコードの構成例を示す説明図が図示されている。
Next, the decoding process will be described with reference to FIGS. 17, 19 and 20. Note that FIG. 19 illustrates a flowchart showing the flow of the decoding process. 20 is a flowchart showing the flow of the decoding process shown in FIG. Further, FIG. 17 illustrates an explanatory diagram showing a configuration example of a
図19に示すように、デコード処理は、リーダ20の電源投入により起動する制御回路40およびメモリ35によって開始され、まずステップS201により初期設定処理が行われる。この処理は、メモリ35の作業領域や画像データを蓄える画像データ蓄積領域をクリアしたり、所定のフラグやカウンタ等をクリアする。なお、ここで説明するリーダ20は、ホストコンピュータHSTと接続されており、当該ホストコンピュータHSTから設定データとして復号キーのデータを取得するものとする。
As shown in FIG. 19, the decoding process is started by the
ステップS203では、タイマーのカウント値をクリアする処理が行われる。このステップS203でカウンタ値がクリアされるタイマーは、次のステップS205により所定時間の経過を計時するものである。 In step S203, a process of clearing the count value of the timer is performed. The timer whose counter value is cleared in this step S203 measures the elapse of a predetermined time in the next step S205.
ステップS205では、先のタイマーにより所定時間が経過したか否かを判断する処理が行われる。即ち、ホストコンピュータHSTから送られてくる設定データに復号キーのデータが含まれているか否かを次のステップS209により判断する必要上、例えば、所定時間として5秒間が経過したか否かを判断し、この時間が経過するまでに、ホストコンピュータHSTから暗号化に関するデータが送られてこない場合には、所定時間の経過とともにステップS207に処理を移行する(S205;Yes)。 In step S205, a process for determining whether or not a predetermined time has elapsed is performed by the previous timer. That is, it is necessary to determine in the next step S209 whether or not the decryption key data is included in the setting data sent from the host computer HST. For example, it is determined whether or not 5 seconds have passed as the predetermined time. However, if the data related to the encryption has not been sent from the host computer HST by the time this time has elapsed, the process proceeds to step S207 with the elapse of a predetermined time (S205; Yes).
これに対し、所定時間が経過していない場合には(S205;No)、次のステップS209により復号キー(復号鍵)を受信したか否かを判断する処理が行われる。そして、これを受信していると判断した場合には(S209;Yes)、続くステップS211に処理を移行し、受信していると判断できない場合には(S209;No)、前述したステップS205に処理を戻して、再度、時間の経過を判断することとなる。 On the other hand, when the predetermined time has not elapsed (S205; No), the process of determining whether or not the decryption key (decryption key) has been received is performed in the next step S209. If it is determined that the message is received (S209; Yes), the process proceeds to the subsequent step S211, and if it is not determined that it is received (S209; No), the process proceeds to step S205 described above. The process is returned to determine again the passage of time.
そして、所定時間が経過したとステップS205により判断した場合には(S205;Yes)、ステップS207により所定のフラグに「0」をセットする。このフラグは、QRコードQの非公開データコードを復号キーで復号するか否かを示すもので、「0」がセットされている場合には、復号キーで復号しないことを示し、「1」がセットされている場合には、復号キーで復号することを示す。このため、209により復号キーを受信していると判断した場合には(S209;Yes)、続くステップS211によりこのフラグに「1」をセットする処理が行われることとなる。 When it is determined in step S205 that the predetermined time has elapsed (S205; Yes), "0" is set in the predetermined flag in step S207. This flag indicates whether or not the private data code of the QR code Q is decrypted by the decryption key. When "0" is set, it indicates that the decryption key is not decrypted, and "1" is set. When is set, it indicates that the decryption key is used for decryption. Therefore, when it is determined that the decryption key is received by 209 (S209; Yes), the process of setting "1" to this flag is performed in the following step S211.
ステップS211により所定のフラグに「1」をセットすると、続くステップ213により、画像データを取得する処理が行われる。即ち、メモリ35の画像データ蓄積領域から蓄えられている画像データを読み出す処理を行う。これにより、例えば、図17に示すようなQRコードQのコード画像を得ることができる。
When "1" is set to the predetermined flag in step S211, the process of acquiring image data is performed in subsequent step 213. That is, the process of reading the image data stored in the image data storage area of the
続くステップS215では、位置検出パターンを検出する処理が行われる。即ち、QRコードQは、図17に示すように、その三隅に位置検出パターンが設けられているため、これらを検出することによって、次のステップS217によりQRコードQのコード外形を検出する。 In the following step S215, processing for detecting the position detection pattern is performed. That is, since the QR code Q has position detection patterns at its three corners as shown in FIG. 17, by detecting them, the code outline of the QR code Q is detected in the next step S217.
そして、ステップS219により各セルの中心座標を算出する処理を行うことによって次ステップS221により各セルの白黒を判別する。これにより、図17に示す形式情報(図17に示す斜線部分)やデータブロックを認識可能になるので、続くステップS223により、欠損等しているデータブロックがある場合には、そのブロックを誤り訂正可能であるかを判断する。 Then, by performing the process of calculating the center coordinates of each cell in step S219, the black and white of each cell is determined in step S221. As a result, the format information (hatched portion shown in FIG. 17) and the data block shown in FIG. 17 can be recognized. Therefore, in the subsequent step S223, if there is a missing data block, the block is error-corrected. Determine if it is possible.
そして、ステップS223により誤り訂正可能であると判断できる場合には(S223;OK)、誤り訂正をして続くステップS300により復号化処理を行う。これに対し、ステップS223により誤り訂正可能であると判断できない場合には(S223;NG)、誤り訂正できないので、ステップS213に処理を移行し、再度画像データを取得してステップS215〜S221の各処理を行う。 If it is determined in step S223 that the error can be corrected (S223; OK), the error is corrected and the decoding process is performed in step S300. On the other hand, if it cannot be determined in step S223 that the error can be corrected (S223; NG), the error cannot be corrected. Therefore, the process proceeds to step S213, the image data is acquired again, and each of steps S215 to S221. Perform processing.
また、このステップS300の後は、ステップS350へ移行し、全ての二次元コードについて復号化処理を終了したか否かを判別する。その結果、全ての二次元コードについて復号化処理を終了した場合には、処理動作を終了させる。一方、全ての二次元コードについて復号化処理を終了していない場合には、再度ステップS201に移行し、これ以降の処理動作を繰り返し実行する。 After step S300, the process proceeds to step S350 to determine whether or not the decoding process has been completed for all the two-dimensional codes. As a result, when the decoding process is completed for all the two-dimensional codes, the processing operation is ended. On the other hand, if the decoding process has not been completed for all the two-dimensional codes, the process proceeds to step S201 again, and the subsequent processing operations are repeatedly executed.
ステップS300は、その詳細が図20に図示されているので、ここからは図20を参照して復号化処理を説明する。図20に示すように、復号化処理では、ステップS301により、まずカウンタnに0(零)をセットする処理が行われる。このカウンタnは、本復号化処理において、QRコードQを構成するデータコードの順番を示す変数として機能することとなる。 The details of step S300 are shown in FIG. 20, and the decoding process will be described below with reference to FIG. As shown in FIG. 20, in the decoding process, first, in step S301, a process of setting the counter n to 0 (zero) is performed. This counter n will function as a variable indicating the order of the data codes forming the QR code Q in this decoding process.
ステップS303では、カウンタnが指すn番目のデータコードを取得する処理が行われる。続くステップS305では、ステップS303により取得されたn番目のデータコードが、終端識別コードであるか否かを判断する処理が行われる。これにより、当該データコードが終端識別コードであると判断した場合には(S305;Yes)、終端識別コードよりも前に配置される通常のデータコードはこれ以上、当該QRコードQには含まれていないことになるので、ステップS315に移行する。 In step S303, a process of acquiring the n-th data code indicated by the counter n is performed. In subsequent step S305, a process of determining whether or not the n-th data code acquired in step S303 is a termination identification code is performed. As a result, when it is determined that the data code is the termination identification code (S305; Yes), the normal data code arranged before the termination identification code is no longer included in the QR code Q. Since this is not the case, the process moves to step S315.
これに対し、当該データコードが終端識別コードであると判断できない場合には(S305;No)、終端識別コードよりも前にまだ通常のデータコードが存在することになるので、続くステップS307に処理を移行して次のデータコード、つまり(n+1)番目のデータコードをコード数iとして取得する。これは、第1実施形態で図16(D)を参照して説明したように、データコードの2文字目相当の位置には、文字数が格納されていることに基づくもので、その詳細は、JISの基本仕様(JIS X 0510:2004)の「8.4データの符号化」に記載されている。 On the other hand, when it is not possible to determine that the data code is the termination identification code (S305; No), it means that there is still a normal data code before the termination identification code, so the process proceeds to step S307. To obtain the next data code, that is, the (n+1)th data code as the code number i. This is because the number of characters is stored in the position corresponding to the second character of the data code, as described with reference to FIG. 16D in the first embodiment. It is described in "8.4 Data Encoding" of the basic specifications of JIS (JIS X 0510:2004).
ステップS307によりコード数iを取得すると、続くステップS309では、この文字数(i)分だけデータコードを取得する処理が行われ、さらにステップS311により当該データコード、つまり開示データコード(開示するデータを表すコード語としてコード化されたデータコード)を復号(デコード)する処理が行われる。 When the code number i is acquired in step S307, a process of acquiring the data code for the number of characters (i) is performed in the following step S309, and further, in step S311, the data code, that is, the disclosed data code (representing disclosed data is represented. A process of decoding (a data code encoded as a code word) is performed.
ステップS311による復号処理が終わると、ステップS313により、カウンタnが次のデータコードを指すように「n+i+1」をカウンタnに設定する処理が行われた後、再びステップS303に処理を戻してn番目のデータコードを取得する処理が行われる。 After the decoding process in step S311, the process of setting "n+i+1" in the counter n so that the counter n points to the next data code is performed in step S313, and then the process returns to step S303 again to return to the nth position. The process of acquiring the data code of is performed.
このように、ステップS303〜S313では、終端識別コードの前方に配置されて元来デコードされる通常のデータコード(開示データコード)を取得してデコードする処理が行われる。 As described above, in steps S303 to S313, a process of acquiring and decoding a normal data code (disclosed data code) that is arranged in front of the termination identification code and originally decoded is performed.
ステップS315は、前述した所定のフラグに「1」がセットされているか否か、つまりQRコードQの非公開データコードを復号キーで復号するか否かを判断する処理が行われる。当該フラグに「1」がセットされていない場合には(S315;No)、復号キーで復号する必要がないため、本復号化処理を終了して図19に示すステップS300を終え、デコード処理を終了する。 In step S315, a process of determining whether or not "1" is set in the above-mentioned predetermined flag, that is, whether or not the private data code of the QR code Q is decrypted by the decryption key is performed. If "1" is not set in the flag (S315; No), there is no need to decrypt with the decryption key, so this decryption processing is terminated and step S300 shown in FIG. finish.
これに対し、所定のフラグに「1」がセットされている場合には(S315;Yes)、復号キーで復号する必要があるため、続くステップS317に処理を移行してカウンタnにn+1を設定し、さらにステップS319によりカウンタnが指すn番目のデータコードを取得する処理が行われる。 On the other hand, when "1" is set in the predetermined flag (S315; Yes), it is necessary to decrypt with the decryption key, so the process proceeds to the subsequent step S317, and the counter n is set to n+1. Then, in step S319, the process of acquiring the n-th data code indicated by the counter n is performed.
そして、続くステップS321では、ステップS319により取得されたn番目のデータコードが、秘匿識別コードであるか否かを判断する処理を行う。 Then, in subsequent step S321, a process of determining whether or not the n-th data code acquired in step S319 is a secret identification code is performed.
これにより、当該データコードが秘匿識別コードであると判断した場合には(S321;Yes)、秘匿識別コードよりも後には、非公開データコードが存在することになる。このため、続くステップS323に処理を移行して次のデータコード、つまり(n+1)番目のデータコードのコード数jを取得する。。これも、ステップS309と同様に、データコードの2文字目相当の位置には、文字数が格納されていることに基づくものである。 As a result, when it is determined that the data code is the confidential identification code (S321; Yes), the private data code exists after the confidential identification code. Therefore, the process proceeds to the subsequent step S323, and the code number j of the next data code, that is, the (n+1)th data code is acquired. .. This is also based on the fact that the number of characters is stored at the position corresponding to the second character of the data code, as in step S309.
なお、ステップS321により秘匿識別コードが配置されていると判断した場合には、ホストコンピュータHSTに対して当該QRコードQには、秘匿識別コードが配置されている旨を通知するように構成してもよい。これにより、ホストコンピュータHSTでは、終端識別コードよりも後方のデータコードが非公開データコードである旨を把握することができる。また、本来、パディングコードしか配置されない終端識別コードの後のコード領域(コード領域の空き部分)に、パディングコード以外のもので非公開データコードではないもの(例えばデータ化けによりパディングコードに該当しなくなったもの)が配置されている場合には、非公開データコードである旨の情報がホストコンピュータHSTに対して出力されないので、非公開データコード以外のものをデコードすることで生じ得る誤動作を防止することが可能となる。 When it is determined in step S321 that the confidential identification code is arranged, the host computer HST is configured to notify the QR code Q that the confidential identification code is arranged. Good. As a result, the host computer HST can recognize that the data code behind the end identification code is a private data code. Originally, only the padding code is placed in the code area after the end identification code (empty part of the code area) other than the padding code, which is not a private data code (for example, it becomes a padding code due to garbled data). Information that is a private data code is not output to the host computer HST, a malfunction that may occur by decoding something other than the private data code is prevented. It becomes possible.
これに対し、当該データコードが秘匿識別コードであると判断できない場合には(S321;No)、秘匿識別コードよりも後には、これ以上、非公開データコードが当該QRコードQには含まれていないことになる。このため、本復号化処理を終了し、全ての二次元コードについて復号化処理を終了したか否かを判別する(S350)。その結果、全ての二次元コードについて復号化処理を終了した場合には、図19に示すステップS300を終えてデコード処理を終了させる。一方、全ての二次元コードについて復号化処理を終了していない場合には、再度ステップS201に移行し、これ以降の処理動作を繰り返し実行する。 On the other hand, when the data code cannot be determined to be the confidential identification code (S321; No), the private code is no longer included in the QR code Q after the confidential identification code. There will be no. Therefore, it is determined whether or not the decoding process has been completed and the decoding process has been completed for all the two-dimensional codes (S350). As a result, when the decoding process is completed for all the two-dimensional codes, step S300 shown in FIG. 19 is ended and the decoding process is ended. On the other hand, if the decoding process has not been completed for all the two-dimensional codes, the process proceeds to step S201 again, and the subsequent processing operations are repeatedly executed.
次にステップS320へ移行し、関連コード情報が含まれているか否か判別を行う。この判別の結果、関連コード情報が含まれている場合には、その関連コード情報の取得処理を行った上で(S320´)、ステップS323へ移行する。一方、関連コード情報が含まれていない場合には、そのままステップS323へ移行する。 Next, the process proceeds to step S320, and it is determined whether or not the related code information is included. As a result of this determination, when the related code information is included, the related code information is acquired (S320′), and then the process proceeds to step S323. On the other hand, if the related code information is not included, the process directly proceeds to step S323.
ステップS323によりコード数jを取得すると、続くステップS325では、この文字数(j)分だけデータコードを取得する処理が行われ、さらにステップS327によりカウンタnが次のデータコード、つまり非公開データコードを指すように「n+j+2」をカウンタnに設定する処理が行われた後、ステップS329によりn番目の復号キー検査データ(鍵特定情報)を取得する処理を行う。 When the code number j is acquired in step S323, a process of acquiring the data code for the number of characters (j) is performed in the following step S325, and further, in step S327, the counter n outputs the next data code, that is, the secret data code. After the process of setting "n+j+2" in the counter n as indicated, the process of acquiring the n-th decryption key check data (key identification information) is performed in step S329.
そして、このステップS329により取得した復号キー検査データに基づいて、先のステップS209によりホストコンピュータHSTから受信した復号キーがこのn番目の非公開データコードの暗号化データを解読する鍵として適合しているか否かの判断をステップS331により行う。その結果、ステップS331に当該復号キーが適合していると判断した場合には(S331;Yes)、続くステップS333により暗号化データを解読する。 Then, based on the decryption key check data acquired in step S329, the decryption key received from the host computer HST in step S209 is matched as a key for decrypting the encrypted data of the n-th private data code. Whether or not there is is determined in step S331. As a result, when it is determined that the decryption key is suitable for step S331 (S331; Yes), the encrypted data is decrypted by the following step S333.
なお、ここでの暗号化は、第1実施形態で説明した公知の視覚復号型暗号技術(視覚復号型秘密分散法)を用いたもので、これにより、非公開データコードの暗号化データがこのような視覚復号型暗号技術により暗号化されている場合でも、復号して元の平文に戻すことができる。 Note that the encryption here uses the known visual decryption encryption technology (visual decryption secret sharing method) described in the first embodiment, whereby the encrypted data of the private data code is Even if it is encrypted by such a visual decryption encryption technology, it can be decrypted and returned to the original plaintext.
これに対して、ステップS331に当該復号キーが適合していると判断できない場合には(S331;No)、当該n番目の非公開データコードを解読することなく、その次の非公開データコードを取得すべく、ステップS337に移行してカウンタnにn+1を設定する。これにより、リーダ20が有する復号キーが当該n番目の非公開データコードを解読できる復号キーでない場合には、当該n番目の非公開データコードは解読も復号されないので、不要な復号処理を抑制することができる。
On the other hand, if it cannot be determined in step S331 that the decryption key is suitable (S331; No), the next private data code is read without decrypting the n-th private data code. In order to obtain it, the process moves to step S337 and the counter n is set to n+1. As a result, when the decryption key of the
ステップS335では、非公開データコードを復号する処理が行われる。即ちその前のステップS333により暗号化データを解読することができているので、このステップS335により解読した暗号化データに基づいて非公開データコードを復号(デコード)する。 In step S335, a process of decoding the private data code is performed. That is, since the encrypted data can be decrypted in the previous step S333, the private data code is decrypted (decoded) based on the encrypted data decrypted in this step S335.
ステップS335による復号処理が終わると、ステップS337により、カウントnが次のデータコードを指すように「n+1」をカウンタnに設定する処理が行われた後、続くステップS339により、n番目のデータコードを取得する処理が行われる。 When the decoding process in step S335 ends, in step S337, the process of setting "n+1" in the counter n so that the count n points to the next data code is performed, and then in step S339, the n-th data code Is obtained.
そして、ステップS341により、ステップS339で取得したn番目のデータコードがパディングコードであるか否かを判断する処理が行われる。これにより、もし当該n番目のデータコードがパディングコードである場合には(S341;Yes)、これ以上、当該QRコードQには非公開データコードが含まれていないことになるので、本復号化処理を終了し、全ての二次元コードについて復号化処理を終了したか否かを判別する(S350)。その結果、全ての二次元コードについて復号化処理を終了した場合には、ステップS300を終えてデコード処理を終了させる。一方、全ての二次元コードについて復号化処理を終了していない場合には、再度ステップS201に移行し、これ以降の処理動作を繰り返し実行する。 Then, in step S341, a process of determining whether or not the n-th data code acquired in step S339 is a padding code is performed. As a result, if the n-th data code is the padding code (S341; Yes), the private data code is not included in the QR code Q any more. The processing is ended, and it is determined whether or not the decoding processing has been completed for all the two-dimensional codes (S350). As a result, when the decoding process is completed for all the two-dimensional codes, step S300 is ended and the decoding process is ended. On the other hand, if the decoding process has not been completed for all the two-dimensional codes, the process proceeds to step S201 again, and the subsequent processing operations are repeatedly executed.
一方、ステップS341により当該n番目のデータコードがパディングコードであると判断されない場合には(S341;No)、当該n番目のデータコードは、非公開データコードであるので、ステップS323に処理を移行して、再び(n+1)番目のデータコードをコード数jを取得することで、前述と同様の処理を行う。 On the other hand, if it is not determined in step S341 that the n-th data code is the padding code (S341; No), the n-th data code is a private data code, and thus the process proceeds to step S323. Then, the same process as described above is performed by acquiring the code number j of the (n+1)th data code again.
このようにして、ステップS319,S323〜S335では、終端識別コードの後方に配置されて、本来はデコードされないデータコード(非公開データコード)を取得してデコードする処理が行われる。 In this way, in steps S319 and S323 to S335, a process of acquiring and decoding a data code (private data code) that is placed behind the end identification code and is not originally decoded is performed.
上述のように、本第2実施形態に係るリーダ20によると、本来、パディングコードしか配置されない終端識別コードの後のコード領域(コード領域の空き部分)に、非公開データコードが配置されていても、この非公開データコードをデコードすることができる。したがって、コード語を配置すべきコード領域の空き部分に存在するデータコードをデコードすることができる。よって、第1実施形態で説明したプリンタ10により印刷されたQRコードQを、本第2実施形態に係るリーダ20によりデコードすることができる。
As described above, according to the
なお、上述したデコード処理では、ステップS329によりn番目の復号キー検査データを取得するように構成したが、例えば、第1実施形態で図16(E)を参照して説明したように復号キーそのものが非公開データコードに付加されている場合には、このステップS329に代えて、n番目の復号キーを取得するように構成してもよい。これにより、非公開データコードの復号キー(復号できる鍵)を当該リーダ20が持っていなくても、当該非公開データコードを復号して元の平文に戻すことができる。
In the decoding process described above, the n-th decoding key check data is acquired in step S329. However, for example, as described with reference to FIG. 16(E) in the first embodiment, the decoding key itself Is added to the private data code, the n-th decryption key may be acquired instead of step S329. As a result, even if the
また、各非公開データコードごとに異なった暗号キーで暗号化されている場合であっても、各非公開データコードについてそれぞれの復号キーが付加されているときには、ステップS329に代えて、n番目の復号キーを取得するように構成することで、非公開データコードの復号キーを当該リーダ20が持っていなくても、それぞれの非公開データコードを復号して元の平文に戻すことが可能となる。
Even if each private data code is encrypted with a different encryption key, if each private data code is added with a corresponding decryption key, instead of step S329, the n-th private data code is added. It is possible to decrypt each private data code and restore it to the original plaintext even if the
さらに、上述したデコード処理では、ステップS329によりn番目の復号キー検査データを取得するように構成したが、例えば、第1実施形態で図16(D)を参照して説明したように位置情報としての「開始桁」が非公開データコードに付加されている場合には、このステップS329に代えて、非公開データコードから「開始桁」を分離してこの分離された「開始桁」に基づいて非公開データコードを復号(デコード)した非公開データをコード化される前のデータレコード中の位置関係に配置するように構成しても良い。これにより、コード語としてコード化される前のデータレコード中の位置関係において前後して混在する場合であっても、デコードしたデータを、この位置情報に基づいてコード化前の位置関係に配置することができる。 Furthermore, in the above-described decoding process, the nth decryption key check data is acquired in step S329. However, for example, as the position information as described in the first embodiment with reference to FIG. If the "start digit" is added to the secret data code, the "start digit" is separated from the secret data code instead of step S329, and based on the separated "start digit". The private data obtained by decoding the private data code may be arranged in a positional relationship in the data record before being encoded. As a result, even if the positional relationship in the data record before being coded as a code word is mixed before and after, the decoded data is arranged in the positional relationship before being coded based on this positional information. be able to.
[第3実施形態]
次に、本発明の第3実施形態に係るプリンタ10による他のQRコードの生成処理を図21および図22を参照して説明する。ここで説明する他のQRコードは、図22(C)に示すように、パディングコード(11101100)の代わりに、任意のコード(例えば00000000や11111111)を空き領域に詰めるフォーマットを採用するものである。
[Third Embodiment]
Next, another QR code generation process by the
なお、図21に示すコード生成処理のフローチャートにおいて、既に説明したコード生成処理(図15)を構成する処理ステップと実質的に同一の処理ステップについては同一符号を付し詳細な説明を省略する。また、図22に示すデータやコードのフォーマット例についても、同様に、既に説明したフォーマット例(図16)と実質的に同一のフォーマットについては詳細な説明を省略する。なお、図22では、便宜上、開示データコードを「開示コード」、終端識別コードを「終端子」、とそれぞれ定義している。 In the flowchart of the code generation processing shown in FIG. 21, the same reference numerals are given to the processing steps that are substantially the same as the processing steps that configure the code generation processing (FIG. 15) already described, and detailed description thereof will be omitted. Also, regarding the format examples of the data and codes shown in FIG. 22, similarly, detailed description of the formats substantially the same as the format example (FIG. 16) already described will be omitted. Note that, in FIG. 22, for convenience, the disclosure data code is defined as “disclosure code”, and the termination identification code is defined as “terminator”.
図21に示すように、コード生成処理は、プリンタ10の電源投入により起動するMPU11およびメモリ12によって開始され、ステップS101により初期設定処理が行われると、次にステップS103により印刷データを受信する。そして、ステップS107,S111を経て非公開データを受信すると、ステップS115により開示データおよび非公開データを並び替え、さらにステップS117により開示データや非公開データ等の各データを符号化した後、ステップS119により誤り訂正符号を生成してステップS121により開示データコードの後に終端識別コードを付加する。
As shown in FIG. 21, the code generation process is started by the
なお、このような終端識別コードを開示データコードの後に付加するのではなく、例えば、図22(C)の括弧内に示すフォーマットのように、全ての開示データコードのデータ長を算出することによって得られる「開示データコードがなすコード列の終端位置」(以下単に「終端位置」という)を特定できる終端位置データ(図22(C)では「終端情報」)を開示データコードの先頭に配置または付加してもよい。 Note that, instead of adding such an end identification code after the disclosed data code, for example, by calculating the data lengths of all disclosed data codes as in the format shown in parentheses in FIG. 22(C). End position data (“end information” in FIG. 22C) that can specify the obtained “end position of the code string formed by the disclosed data code” (hereinafter simply referred to as “end position”) is placed at the beginning of the disclosed data code or You may add.
そして、印刷データに非公開データが含まれている場合には(S123;Yes)、S124に移行する。このステップS124においては、関連コード情報の付加が必要か否かを判別する。関連コード情報の付加が必要な場合、ステップS124´に移行し、関連コード情報の配置処理を行う。関連コード情報の付加が不要な場合には、ステップS125に移行する。 If the print data includes private data (S123; Yes), the process proceeds to S124. In step S124, it is determined whether or not the related code information needs to be added. If the related code information needs to be added, the process proceeds to step S124', and the related code information arrangement process is performed. If it is unnecessary to add the related code information, the process proceeds to step S125.
ステップS125〜S133によって、終端位置に続けて秘匿識別コード等を付加した後、また印刷データに非公開データが含まれていない場合には(S123;No)、終端位置の後に、それぞれステップS135’により、前述した任意コードとして、例えば、00000000や11111111を付加する。 After steps S125 to S133, after adding the confidential identification code or the like to the end position, or when the print data does not include non-public data (S123; No), after the end position, step S135', respectively. Accordingly, for example, 00000000 or 11111111 is added as the above-mentioned arbitrary code.
即ち、ステップS135’による任意コードの付加処理では、終端位置よりも後でRS符号よりも前の範囲において、非公開データコードを詰めても空き領域(コード領域の空き部分)が生じる場合にパディングコードに代えて任意のコード(例えば00000000や11111111)を詰める。このため、例えば、このようなデータフォーマットを構成するメモリ上で、予め全ての範囲をこのような任意のコードで埋める初期化処理をステップS101において処理している場合には、当該ステップS135’を行うことなく省略することができる(図21ではステップS135’の枠線は破線で表現されている)。 That is, in the process of adding an arbitrary code in step S135′, padding is performed in the range after the end position and before the RS code, even if the private data code is packed, if a blank area (a blank portion of the code area) occurs. Arbitrary code (for example, 00000000 or 11111111) is packed instead of the code. Therefore, for example, in the case where the initialization process of filling the entire range with such an arbitrary code in advance on the memory configuring such a data format is processed in step S101, the step S135′ is executed. It can be omitted without performing (the frame line of step S135′ is represented by a broken line in FIG. 21).
そして、ステップS137により、誤り訂正コード語であるRS符号を付加する処理が行われると、図22(C)に示すフォーマットのデータコードが生成されるため、続くステップS139によりこのようなデータコードに基づいて各セルを生成して図17に示して説明したデータブロックに配置される。つまり、本来、パディングコードが配置される範囲に前述した任意コードが配置されること以外は、図15〜図17を参照して説明したQRコードと同様に配置されることとなる。 Then, when the process of adding the RS code which is the error correction code word is performed in step S137, the data code of the format shown in FIG. 22C is generated, and therefore such a data code is generated in the following step S139. Based on this, each cell is generated and placed in the data block described and shown in FIG. That is, except that the arbitrary code described above is originally arranged in the range in which the padding code is arranged, the QR code is arranged in the same manner as the QR code described with reference to FIGS.
以上説明したように、本第3実施形態に係るプリンタ10によると、MPU11により実行されるコード生成処理によって生成されるQRコードQでは、ステップS133により非公開データコードが終端位置の後に配置されている。これにより、終端位置の後に配置された非公開データコードは、一般仕様の読取装置では読み取りの対象にならないので、このような非公開データコードが含まれる二次元コードを一般仕様の読取装置で読み取っても、当該非公開データコードによって秘匿しようとするデータの存在はわからない。従って、一般仕様の読取装置の利用者には非公開データの存在を認識させないようにすることが可能となる。
As described above, in the
よって、このような非公開データコードを含んでいても、一般仕様の読取装置には当該非公開データコードのデコードデータに相当するものが画面表示されないので、利用者に非公開データの存在を認識させることがなく、当該利用者に対して不信感を与えたり、解読を試みようとする不用意な動機を与えることを防止することができる。また、当該非公開データコードのデコードデータに相当するものが制御データ等であっても、それが画面表示されることがないので、画面表示が乱れたりすることを防止することができる。 Therefore, even if such a non-public data code is included, the equivalent of the decoded data of the non-public data code is not displayed on the screen of the general-purpose reading device, so that the user recognizes the existence of the non-public data. Therefore, it is possible to prevent the user from feeling distrustful or giving an inadvertent motivation to try decryption without causing the user to do so. Further, even if the data corresponding to the decoded data of the secret data code is the control data or the like, it is not displayed on the screen, so that the screen display can be prevented from being disturbed.
なお、上述した第3実施形態では、プリンタ10により、ラベルPにQRコードQを印刷する例を挙げて説明したが、本発明はこれに限定されることはなく、QRコードQを視覚的に表現可能なものであればよく、例えば、図21に示すコード生成処理をPC本体2により実行してディスプレイ3にQRコードQを表示するように構成してもよい。この場合、コード生成処理は、コンピュータプログラムとして概念できるので、例えば、「開示するデータを表すコード語としてコード化された開示データコードの総数が、コード語を配置すべきコード領域に収容可能な容量に満たない場合、前記コード領域に配置された前記開示データコードがなすコード列の終端を示す終端識別コードをこのコード列の最後に配置、または前記開示データコードがなすコード列の終端位置を特定可能な終端識別情報をこのコード列の所定の位置に配置する二次元コードの生成装置として、コンピュータを機能させるためのプログラムであって、秘匿するデータを表すコード語としてコード化された非公開データコードを、前記終端識別コードの後、または前記終端識別情報により特定される前記終端位置の後、に配置することを特徴とする二次元コードの生成プログラム。」と表現可能な技術的思想を把握できる。これにより、この二次元コードの生成プログラムにより二次元コードの生成装置として機能するコンピュータは、上述したプリンタ10のMPU11等と同様の作用および効果を奏する。
In the third embodiment described above, an example in which the
また、上述した第3実施形態では、プリンタ10にPC1を接続して当該PC1から印刷データを送る構成を例示して説明したが、英数字、漢字や記号等の文字データを出力可能な情報処理装置であれば、このような機能を備えたデジタルカメラや携帯電話機、あるいはハンドヘルドコンピュータやハンディターミナル等を、プリンタ10に接続する構成を採用しても上述した作用および効果を得ることができる。
Further, in the above-described third embodiment, the configuration in which the
[第4実施形態]
次に、本発明の第4実施形態に係るリーダ20による他のQRコードのデコード処理を図23および図24を参照して説明する。なお、「他のQRコード」とは、パディングコード(11101100)の代わりに、任意のコード(例えば00000000や11111111)を空き領域に詰めるフォーマットを採るコードのことで、第3実施形態に係るプリンタ10により印刷されたQRコードのことである。
[Fourth Embodiment]
Next, another QR code decoding process by the
なお、図23に示すデコード処理のフローチャートにおいて、既に説明したデコード処理(図19)を構成する処理ステップと実質的に同一の処理ステップについては同一符号を付し詳細な説明を省略する。また、図24に示す復号化処理のフローチャートにおいて、既に説明した復号化処理(図20)を構成する処理ステップと実質的に同一の処理ステップについては同一符号を付し詳細な説明を省略する。 Note that, in the flowchart of the decoding process shown in FIG. 23, the same reference numerals are given to the processing steps that are substantially the same as the processing steps constituting the decoding process (FIG. 19) already described, and detailed description thereof will be omitted. Also, in the flowchart of the decoding process shown in FIG. 24, the same reference numerals are given to the processing steps that are substantially the same as the processing steps that configure the decoding process (FIG. 20) already described, and detailed description thereof will be omitted.
図23に示すように、デコード処理は、リーダ20の電源投入により起動する制御回路40およびメモリ35によって開始され、ステップS201により初期設定処理が行われると、ステップS205により所定時間を経過した後(S205;Yes)、またはステップS209により復号キーを受信した後(S209;Yes)、ステップS213により画像データを取得する。そして、ステップS215,S217,S219,S221によりQRコードQを画像認識してステップS223により誤り訂正可能であるか否かを判断して、誤り訂正可能であると判断できる場合には(S223;OK)、誤り訂正をした後、ステップS300’により復号化処理(図11)を行う。また、このステップS300’の後は、ステップS350へ移行し、全ての二次元コードについて復号化処理を終了したか否かを判別する。その結果、全ての二次元コードについて復号化処理を終了した場合には、処理動作を終了させる。一方、全ての二次元コードについて復号化処理を終了していない場合には、再度ステップS201に移行し、これ以降の処理動作を繰り返し実行する。
As shown in FIG. 23, the decoding process is started by the
図24に示すように、ステップS300’の復号化処理では、ステップS301〜S313により終端位置(開示データコードがなすコード列の終端位置で、終端識別コードまたは終端位置データにより特定可能なもの)が見つかると(S305’;Yes)、ステップS315,S317,S319によりカウンタnが指すn番目のデータコードを取得してそれが秘匿識別コードであるか否かをステップS321により判断することとなる。そして、秘匿識別コードであると判断すると(S321;Yes)、ステップS320へ移行し、関連コード情報が含まれているか否か判別を行う。この判別の結果、関連コード情報が含まれている場合には、その関連コード情報の取得処理を行った上で(S320´)、ステップS323へ移行する。一方、関連コード情報が含まれていない場合には、そのままステップS323へ移行する。S323〜S331により復号キーの適合を調べてその復号キーでS333により暗号化データを解読し、さらにステップS335により非公開データコードを復号する。 As shown in FIG. 24, in the decoding process of step S300′, the end position (the end position of the code string formed by the disclosed data code, which can be specified by the end identification code or the end position data) is determined in steps S301 to S313. If found (S305'; Yes), the nth data code indicated by the counter n is acquired in steps S315, S317, and S319, and it is determined in step S321 whether or not it is the secret identification code. When it is determined that the code is the confidential identification code (S321; Yes), the process proceeds to step S320, and it is determined whether the related code information is included. As a result of this determination, when the related code information is included, the related code information is acquired (S320′), and then the process proceeds to step S323. On the other hand, if the related code information is not included, the process directly proceeds to step S323. The matching of the decryption key is checked in S323 to S331, the encrypted data is decrypted in S333 with the decryption key, and the secret data code is decrypted in step S335.
なお、ステップS321により秘匿識別コードが配置されていると判断した場合には、例えば、ホストコンピュータHSTに対して当該QRコードQには、秘匿識別コードが配置されている旨を通知するように構成してもよい。これにより、ホストコンピュータHSTでは、終端識別コードよりも後方のデータコードが非公開データコードである旨を把握することが可能となる。また、本来、パディングコードしか配置されない終端識別コードの後のコード領域(コード領域の空き部分)に、パディングコード以外のもので非公開データコードではないもの(例えばデータ化けによりパディングコードに該当しなくなったもの)が配置されている場合には、非公開データコードである旨の情報がホストコンピュータHSTに対して出力されないので、非公開データコード以外のものをデコードすることで生じ得る誤動作を防止することが可能となる。 When it is determined in step S321 that the confidential identification code is placed, for example, the host computer HST is notified that the QR code Q has the confidential identification code. You may. As a result, the host computer HST can recognize that the data code behind the end identification code is a private data code. Originally, only the padding code is placed in the code area after the end identification code (empty part of the code area) other than the padding code, which is not a private data code (for example, it becomes a padding code due to garbled data). Information that is a private data code is not output to the host computer HST, a malfunction that may occur by decoding something other than the private data code is prevented. It becomes possible.
そして、ステップS336’によりこの復号した非公開データコードが最後の非公開データコードであるか否かを判断する。具体的には、例えば、図22(C)に示すように、秘匿識別子の次には、その後に続く非公開データコードのデータ長が格納されているので、これに基づいて当該非公開データコードが最後の非公開データコードに該当するか否かを判断する。また、上述したように、最後の非公開データコードの後、つまり空き領域(コード領域の空き部分)には任意のコード(例えば00000000や11111111)が詰められているので、このような任意のコードの存在に基づいて当該非公開データコードが最後の非公開データコードに該当するか否かを判断する。 Then, in step S336', it is determined whether the decrypted private data code is the last private data code. Specifically, for example, as shown in FIG. 22(C), since the secret identifier stores the data length of the private data code that follows it, the private data code is based on this. Determines whether is the last private data code. Further, as described above, since any code (for example, 00000000 or 11111111) is packed after the last private data code, that is, in the empty area (empty part of the code area), such an arbitrary code It is determined whether or not the private data code corresponds to the last private data code based on the existence of the.
ステップS336’により当該非公開データコードが最後の非公開データコードであると判断されない場合(最後の非公開データコードでない判断された場合)には(S336’;No)、ステップS337により、カウントnが次のデータコードを指すように「n+1」をカウンタnに設定する処理が行われた後、続くステップS339により、n番目のデータコードを取得する処理が行われて、前述と同様にステップS323〜S331により復号キーの適合を調べる。 When it is not determined in step S336′ that the private data code is the last private data code (when it is determined that it is not the last private data code) (S336′; No), the count n is calculated in step S337. After the process of setting “n+1” in the counter n so that indicates the next data code is performed, the process of acquiring the nth data code is performed in the following step S339, and step S323 is performed as described above. The matching of the decryption key is checked by S331.
これに対し、ステップS336’により当該非公開データコードが最後の非公開データコードであると判断された場合(S336’;Yes)、これ以上、当該QRコードQには非公開データコードが含まれていないことになるので、本復号化処理を終了し、全ての二次元コードについて復号化処理を終了したか否かを判別する(S350)。その結果、全ての二次元コードについて復号化処理を終了した場合には、ステップS300を終えてデコード処理を終了させる。一方、全ての二次元コードについて復号化処理を終了していない場合には、再度ステップS201に移行し、これ以降の処理動作を繰り返し実行する。 On the other hand, when the private data code is determined to be the last private data code in step S336′ (S336′; Yes), the private data code is further included in the QR code Q. Since this is not the case, this decoding process is terminated, and it is determined whether or not the decoding process has been completed for all two-dimensional codes (S350). As a result, when the decoding process is completed for all the two-dimensional codes, step S300 is ended and the decoding process is ended. On the other hand, if the decoding process has not been completed for all the two-dimensional codes, the process proceeds to step S201 again, and the subsequent processing operations are repeatedly executed.
なお、ステップS303〜S313では、終端位置の前方に配置されて元来デコードされる通常のデータコード(開示データコード)を取得してデコードする処理が行われる。 Note that in steps S303 to S313, a process of acquiring and decoding a normal data code (disclosed data code) that is arranged in front of the end position and originally decoded is performed.
また、ステップS321では、ステップS319により取得されたn番目のデータコードが、秘匿識別コードであるか否かを判断する処理が行われる。 In step S321, a process of determining whether or not the nth data code acquired in step S319 is a secret identification code is performed.
さらに、ステップS319,S323〜S335では、終端位置の後方に配置されて、本来はデコードされないデータコード(非公開データコード)を取得してデコードする処理が行われる。 Further, in steps S319 and S323 to S335, a process of acquiring and decoding a data code (private data code) that is arranged behind the end position and is not originally decoded is performed.
以上説明したように、本第4実施形態に係るリーダ20によると、本来、データコードが配置されない終端位置の後のコード領域(コード領域の空き部分)に、非公開データコードが配置されていても、この非公開データコードをデコードすることができる。したがって、コード語を配置すべきコード領域の空き部分に存在するデータコードをデコードすることができる。よって、第3実施形態で説明したプリンタ10により印刷されたQRコードQを、本第4実施形態に係るリーダ20によりデコードすることができる。
As described above, according to the
なお、上述したデコード処理では、ステップS329によりn番目の復号キー検査データを取得するように構成したが、例えば、第1実施形態で図16(E)を参照して説明したように第3実施形態でも同様に、復号キーそのものが非公開データコードに付加されている場合には(図22(E)参照)、このステップS329に代えて、n番目の復号キーを取得するように構成しても良い。これにより、非公開データコードの復号キー(復号できる鍵)を当該リーダ20が持っていなくても、当該非公開データコードを復号して元の平文に戻すことができる。
In the decoding process described above, the n-th decryption key check data is acquired in step S329. However, for example, as described in the first embodiment with reference to FIG. Similarly, in the mode, when the decryption key itself is added to the private data code (see FIG. 22(E)), the n-th decryption key is obtained instead of step S329. Is also good. As a result, even if the
また、各非公開データコードごとに異なった暗号キーで暗号化されている場合であっても、各非公開データコードについてそれぞれの復号キーが付加されているときには、ステップS329に代えて、n番目の復号キーを取得するように構成することで、非公開データコードの復号キーを当該リーダ20が持っていなくても、それぞれの非公開データコードを復号して元の平文に戻すことが可能となる。
Even if each private data code is encrypted with a different encryption key, if each private data code is added with a corresponding decryption key, instead of step S329, the n-th private data code is added. It is possible to decrypt each private data code and restore it to the original plaintext even if the
さらに、上述したデコード処理では、ステップS329によりn番目の復号キー検査データを取得するように構成したが、例えば、第1実施形態で図16(D)を参照して説明したように第3実施形態でも同様に、位置情報としての「開始桁」が非公開データコードに付加されている場合には(図22(D)参照)、このステップS329に代えて、非公開データコードから「開始桁」を分離してこの分離された「開始桁」に基づいて非公開データコードを復号(デコード)した非公開データをコード化される前のデータレコード中の位置関係に配置するように構成してもよい。これにより、コード語としてコード化される前のデータレコード中の位置関係において前後して混在する場合であっても、デコードしたデータを、この位置情報に基づいてコード化前の位置関係に配置することが可能となる。 Further, in the decoding process described above, the n-th decryption key check data is acquired in step S329. However, for example, as described in the first embodiment with reference to FIG. Similarly, in the form, when the “start digit” as the position information is added to the secret data code (see FIG. 22D), instead of this step S329, the “start digit” is changed from the secret data code. , And the private data code obtained by decoding the private data code based on the separated “start digit” is arranged in the positional relationship in the data record before being encoded. Good. As a result, even if the positional relationship in the data record before being coded as a code word is mixed before and after, the decoded data is arranged in the positional relationship before being coded based on this positional information. It becomes possible.
[第5実施形態]
次に、本発明の第5実施形態に係るプリンタ10による他のQRコードの生成処理を図25〜図27を参照して説明する。ここで説明する他のQRコードは、図27(B)等に示すように、非公開データコードα,β等に所定の加工を施して空き領域に詰めるフォーマットを採るものである。
[Fifth Embodiment]
Next, another QR code generation process by the
なお、図25に示すコード生成処理のフローチャートにおいて、既に説明したコード生成処理(図15)を構成する処理ステップと実質的に同一の処理ステップについては同一符号を付し詳細な説明を省略する。また、図27に示すコードのフォーマット例についても、同様に、既に説明したフォーマット例(図16)と実質的に同一のフォーマットについては詳細な説明を省略する。なお、図27では、便宜上、開示データコードを「開示コード」、終端識別コードを「終端子」、とそれぞれ表現するものとする。 Note that in the flowchart of the code generation processing shown in FIG. 25, the same reference numerals are given to the processing steps that are substantially the same as the processing steps constituting the code generation processing (FIG. 15) already described, and detailed description thereof will be omitted. Similarly, with respect to the format example of the code shown in FIG. 27, detailed description of the format substantially the same as the format example (FIG. 16) already described will be omitted. Note that in FIG. 27, for convenience, the disclosure data code is expressed as “disclosure code”, and the termination identification code is expressed as “terminator”.
図25に示すように、コード生成処理は、プリンタ10の電源投入により起動するMPU11およびメモリ12によって開始され、ステップS101により初期設定処理が行われると、次にステップS103により印刷データを受信する。そして、ステップS107,S111を経て非公開データを受信すると、ステップS117により開示データや非公開データ等の各データを符号化した後、ステップS121’により開示データコードの後に終端識別コード等(開示データコードがなすコード列の終端位置を含む)を付加する。
As shown in FIG. 25, the code generation process is started by the
そして、印刷データに非公開データが含まれている場合には(S123;Yes)、S124に移行する。このステップS124においては、関連コード情報の付加が必要か否かを判別する。関連コード情報の付加が必要な場合、ステップS124´に移行し、関連コード情報の配置処理を行う。関連コード情報の付加が不要な場合には、ステップS125に移行する。ステップS125,S127により終端位置に続けて秘匿識別コードを付加等した後、ステップS131により非公開データコードを暗号化し、さらにステップS132により空き領域にパディングコードを付加する。この後にステップS500による所定の加工処理が行われる。一方、印刷データに非公開データが含まれていない場合には(S123;No)、これらの各処理(S125,S127,S131,S132,S500)を行うことなく、ステップS133に処理を移行する。 If the print data includes private data (S123; Yes), the process proceeds to S124. In step S124, it is determined whether or not the related code information needs to be added. If the related code information needs to be added, the process proceeds to step S124', and the related code information arrangement process is performed. If it is unnecessary to add the related code information, the process proceeds to step S125. After the secret identification code is added to the end position in steps S125 and S127, the secret data code is encrypted in step S131, and the padding code is added to the empty area in step S132. After this, a predetermined processing process is performed in step S500. On the other hand, if the print data does not include non-public data (S123; No), the process proceeds to step S133 without performing these processes (S125, S127, S131, S132, S500).
ここで、ステップS500による所定の加工処理を図26を参照して説明する。図26に示すように、所定の加工処理では、まずステップS501によりポインタiをゼロクリアする処理が行われる。このポインタiは、ステップS507〜S517による分散配置処理の対象となるビット位置を指すものであって、このクリア処理によって0ビット目からスタートする。 Here, the predetermined processing process in step S500 will be described with reference to FIG. As shown in FIG. 26, in the predetermined processing, first, a process of zero clearing the pointer i is performed in step S501. This pointer i points to a bit position that is the target of the distributed arrangement processing in steps S507 to S517, and starts from the 0th bit by this clear processing.
ステップS503では、終端位置よりも後に存在する空き領域(図27(A)〜(C)参照)、即ち、本来パディングコードで埋められる領域で誤り訂正コード語であるRS符号の範囲を除いた領域のビット数nを求める処理が行われる。この処理は、後述のステップS513により疑似乱数Rを求める際に使用される定数である。 In step S503, an empty area that exists after the end position (see FIGS. 27A to 27C), that is, an area that is originally filled with padding codes and excludes the range of the RS code that is the error correction code word A process for obtaining the number of bits n of is performed. This process is a constant used when the pseudo random number R is obtained in step S513 described later.
続くステップS505では、暗号化データのビット数と復号キー検査データのビット数との和m(図27(D),(E)参照)を求める処理が行われる。即ち、分散配置処理の対象となる非公開データコードのビット数を把握することにより、後述のステップS519による分散配置完了の可否判断を可能にしている。 In the following step S505, a process of obtaining the sum m (see FIGS. 27D and 27E) of the bit number of the encrypted data and the bit number of the decryption key check data is performed. That is, by grasping the number of bits of the secret data code which is the target of the distributed arrangement processing, it is possible to determine whether or not the distributed arrangement is completed in step S519, which will be described later.
次のステップS507では、開示データコードと暗号化データとを2バイト単位で排他的論理和(EXOR)演算を行いその結果Sを求める処理が行われ、続くステップS509ではこのような演算結果SをステップS513による疑似乱数のシード値にセットする処理が行われる。このシード値は、所定の演算により疑似乱数を発生させるための種であり、このシード値が同じであれば、発生する乱数はまったく同じものとなる。すなわち、ステップS513による疑似乱数は、この演算結果Sの値によって発生する値およびその発生順が一義的に定まる。この点で、本加工処理は、開示データコードの内容に基づいて行われることとなる。 In the next step S507, a process of performing an exclusive OR (EXOR) operation on the disclosed data code and the encrypted data in units of 2 bytes to obtain the result S is performed, and in the subsequent step S509, such an operation result S is obtained. The process of setting the seed value of the pseudo random number in step S513 is performed. This seed value is a seed for generating a pseudo-random number by a predetermined calculation, and if the seed value is the same, the generated random numbers will be exactly the same. That is, in the pseudo-random number generated in step S513, the value generated by the value of the calculation result S and the generation order thereof are uniquely determined. In this respect, this processing is performed based on the contents of the disclosed data code.
ステップS511では、ポインタiをインクリメント、つまり1だけカウントアップさせる処理が行われる。これにより、ステップS517等による分散配置処理の対象となるビットの位置(ポインタiが指し示す位置)のカウントがアップされる。先の例では、0から1にカウントアップされることで、1ビット目が指し示めされる。 In step S511, a process of incrementing the pointer i, that is, counting up by 1, is performed. As a result, the count of the position of the bit (the position pointed by the pointer i) that is the target of the distributed arrangement processing in step S517 and the like is incremented. In the previous example, counting up from 0 to 1 indicates the first bit.
続くステップS513により、疑似乱数Rを求める処理が行われる。この演算は、前述したシード値に基づいて所定の乱数発生アルゴリズムに従った情報処理を行うことにより、擬似的に乱数を発生させるもので、ここでは、1からn(nは、空き領域のビット数)までの範囲で、疑似乱数を発生させる。このため、例えば「R=rand()mod n+1」なる演算式で演算される。 In a succeeding step S513, a process for obtaining the pseudo random number R is performed. This operation is to generate a pseudo random number by performing information processing according to a predetermined random number generation algorithm based on the seed value described above, and here, 1 to n (n is a bit of an empty area). Generate pseudo-random numbers in the range up to (number). For this reason, for example, it is calculated by the arithmetic expression “R=rand()mod n+1”.
なお、rand()は、シード値Sに対して疑似乱数を返す関数で、また、xmodyは、xに対してモジュロー値yを求める関数である。即ち、先の演算式では、modの前の引数x(rand()のこと)となる疑似乱数の値を、modの後の引数y(nのこと)で割ったときの余りに、1を加えた値として疑似乱数Rが求められる。なお、nは、上述したように、空き領域のビット数である。 Note that rand() is a function that returns a pseudo-random number with respect to the seed value S, and xmody is a function that obtains the modulo value y with respect to x. That is, in the above arithmetic expression, 1 is added to the remainder when the value of the pseudo-random number that is the argument x (which is rand()) before mod is divided by the argument y (which is n) after mod. The pseudo random number R is obtained as the value. Note that n is the number of bits in the empty area, as described above.
このようにステップS513によって1〜nまでの疑似乱数Rが求められると、次のステップS515により当該疑似乱数Rが既に発生したものであるか否かの判断処理が行われる。つまり、疑似乱数Rとして同じ値が発生すると、次のステップS517による再配置処理においてビット値の上書きが行われることから、それ以前に同じビット位置に配置された値が破壊されてしまうことを防止するためである。このため、このステップS515により既に疑似乱数Rとして同じ値が発生していると判断された場合には(S515;Yes)、ステップS513に戻って再度、疑似乱数Rを求める。 In this way, when the pseudo random number R from 1 to n is obtained in step S513, the process of determining whether or not the pseudo random number R has already been generated is performed in step S515. That is, when the same value is generated as the pseudo random number R, the bit value is overwritten in the rearrangement process in the next step S517, so that the value arranged at the same bit position before that is prevented from being destroyed. This is because Therefore, when it is determined in step S515 that the same value has already been generated as the pseudo random number R (S515; Yes), the process returns to step S513 and the pseudo random number R is obtained again.
ステップS515により既に発生した疑似乱数Rと同じ値であると判断されない場合には(S515;No)、続くステップS517により暗号化データのiビット目(ポインタiが指し示すビットの位置)の値を空き領域のRビット目にセットする処理、つまり配置処理が行われる。先の例では、1ビット目の値が空き領域のRビット目にセットされる。これにより、本来1ビット目に位置している情報が、乱数により不規則的に発生するRビット目に移動することとなる。 If it is not determined in step S515 that the value is the same as the already generated pseudo-random number R (S515; No), the value of the i-th bit (the position of the bit pointed by the pointer i) of the encrypted data is vacant in subsequent step S517. A process of setting the R-th bit in the area, that is, a layout process is performed. In the above example, the value of the first bit is set to the R bit of the empty area. As a result, the information originally located at the 1st bit moves to the Rth bit which is randomly generated by the random number.
続くステップS519では、ポインタiの値が、分散配置処理の対象となる非公開データコードのビット数の終わり(最終ビット)に達しているか否かを判断する処理、つまり分散配置完了の可否判断が行われる。そして、ポインタiと非公開データコードの全ビット数とが一致している場合には、非公開データコードの全てのビットが上述したステップS507〜517による分散配置処理が施されていることになるので(S519;Yes)、本加工処理を終了する。 In a succeeding step S519, a process of determining whether or not the value of the pointer i has reached the end (final bit) of the number of bits of the secret data code which is the target of the distributed placement process, that is, the determination of whether or not the distributed placement is completed is performed. Done. If the pointer i and the total number of bits of the private data code match, all the bits of the private data code have been subjected to the distributed arrangement processing in steps S507 to 517 described above. Therefore (S519; Yes), this processing is terminated.
これに対して、ポインタiと非公開データコードの全ビット数とが一致していない場合には、非公開データコードにはまだ分散配置処理が施されていないビットが残存することになるので(S519;No)、ステップS511によりポインタiをカウントアップして再度ステップS513による疑似乱数発生処理を行う。 On the other hand, if the pointer i and the total number of bits of the private data code do not match, the private data code will have bits that have not been subjected to the distributed arrangement processing ( S519; No), the pointer i is counted up in step S511, and the pseudo random number generation process in step S513 is performed again.
このようにステップS513〜S517による処理を非公開データコードの全ビットに対して繰り返し行うことにより、本来、1ビット目、2ビット目、3ビット目、…、(n−1)ビット目、nビット目というように順番に並ぶ各ビット情報が、不規則的に変動する疑似乱数Rに従った位置にRビット目にそれぞれ移動してしまう。このため、ステップS500による所定の加工処理が終了すると、例えば、図27(B)に示すように、分散配置処理が施される前の非公開データコードα,β(図27(A))は、いずれもビット単位でバラバラに分解されて非公開データコード片として分散して再配置され、また、パディングコードも同様に分散配置処理よってビット単位でバラバラに分解されるため、非公開データコード片と混在した状態で、空き領域内に再配置されることとなる。 In this way, by repeating the processing in steps S513 to S517 for all the bits of the secret data code, originally, the first bit, the second bit, the third bit,..., (n−1)th bit, n Each piece of bit information arranged in order such as the bit-threshold moves to the R-th bit at a position according to the pseudo-random number R that fluctuates irregularly. Therefore, when the predetermined processing process in step S500 is completed, for example, as shown in FIG. 27(B), the secret data codes α and β (FIG. 27(A)) before the distributed arrangement process are performed , All of them are disassembled bit by bit and distributed and rearranged as private data code pieces, and the padding code is also disassembled into individual pieces by the distributed allocation process. It will be rearranged in the empty area in the state of being mixed with.
これにより、暗号化されている非公開データコードがさらにスクランブルされてしまうので、セキュリティの強度を一層高めることができる。 As a result, the encrypted private data code is further scrambled, so that the strength of security can be further enhanced.
なお、本加工処理では、このようなステップS507〜S517による分散配置処理に代えて、例えば、ビット位置を変換可能なビット位置変換テーブル(変換テーブル)に基づくビットの並替えでもよい。具体的には、例えば、1ビット目を4ビット目に、2ビット目を13ビット目に、3ビット目を1ビット目に、4ビット目を2ビット目に、5ビット目を15ビット目に、6ビット目を11ビット目に、7ビット目を8ビット目に、8ビット目を3ビット目に、9ビット目を10ビット目に、10ビット目を6ビット目に、11ビット目を12ビット目に、12ビット目を5ビット目に、13ビット目を9ビット目に、14ビット目を16ビット目に、15ビット目を7ビット目に、16ビット目を14ビット目に、それぞれ位置を変換するビット位置変換テーブルを設けその変換規則に従ってビット位置を変換する。これにより、例えば、16ビット構成のデータ「1001011011010110」(96D6h)は、「0101101101100001」(5A61h)に変換される。 In this processing, instead of the distributed arrangement processing in steps S507 to S517, for example, bits may be rearranged based on a bit position conversion table (conversion table) capable of converting bit positions. Specifically, for example, the first bit is the fourth bit, the second bit is the thirteenth bit, the third bit is the first bit, the fourth bit is the second bit, the fifth bit is the fifteenth bit. 6th bit to 11th bit, 7th bit to 8th bit, 8th bit to 3rd bit, 9th bit to 10th bit, 10th bit to 6th bit, 11th bit To 12th bit, 12th bit to 5th bit, 13th bit to 9th bit, 14th bit to 16th bit, 15th bit to 7th bit, 16th bit to 14th bit , A bit position conversion table for converting the position is provided, and the bit position is converted according to the conversion rule. Thereby, for example, 16-bit data “1001011011010110” (96D6h) is converted into “0101101101100001” (5A61h).
また、このようなビット位置変換テーブルを通すことによって、例えば、先の例では、16進表記のデータ「96D6h」が、「5A61h」に変換されることから、非公開データコードを構成するビットにより特定されるデータ値、そのものを所定のデータ値変換テーブル(変換テーブル)に基づいて変換する技術的思想として把握することができる。なお、このデータ値の変換は、例えば、入力データXを2倍にしてから1を減算して出力Y(=X×2−1)するといった所定のデータ値変換式によっても可能である。 Further, by passing through such a bit position conversion table, for example, in the above example, since the hexadecimal notation data “96D6h” is converted to “5A61h”, it is possible to use the bits forming the private data code. It can be understood as a technical idea of converting the specified data value itself based on a predetermined data value conversion table (conversion table). Note that this data value conversion can also be performed by a predetermined data value conversion formula, for example, in which the input data X is doubled and then 1 is subtracted to output Y (=X×2-1).
さらに、例えば、ビット位置を所定ビット数だけLSB側に循環してシフトするように、循環シフトレジスタを通してもよい。先の16ビット構成のデータ例では、「1001011011010110」(96D6h)は、「0110100101101101」(696Dh)に変換される。勿論、シフト量は4ビットに限られることはなく、16ビット構成の場合には、1ビット〜15ビットのうちのいずれでもよく、またシフト方向もMSB側であってもよい。なお、ここで例示した16ビット構成の16ビットは、上述した暗号化データのビット数と復号キー検査データのビット数の和mに相当するものである。なお、図27(D)には、上述したような分散配置処理以外のビットの並替えやビット値の変換によるフォーマット例(暗号化データ+復号キー検査データ)が図示されている(図27(E)は、比較として第3実施形態のコード生成処理により生成された非公開データコードの構成例である。)。 Further, for example, a cyclic shift register may be used so that the bit position is cyclically shifted by a predetermined number of bits to the LSB side. In the above 16-bit data example, “1001011011010110” (96D6h) is converted to “0110100101101101” (696Dh). Of course, the shift amount is not limited to 4 bits, and in the case of a 16-bit configuration, it may be any of 1 bit to 15 bits, and the shift direction may be on the MSB side. The 16 bits in the 16-bit configuration illustrated here correspond to the sum m of the number of bits of the encrypted data and the number of bits of the decryption key check data described above. Note that FIG. 27D shows an example of a format (encrypted data+decryption key check data) by rearranging bits or converting bit values other than the above-described distributed arrangement processing (FIG. 27( E) is a configuration example of a secret data code generated by the code generation processing of the third embodiment for comparison).
また、前述したステップS507では、開示データコードと暗号化データとを2バイト単位で排他的論理和(EXOR)演算を行いその結果Sを求め、それをステップS509により疑似乱数のシード値にセットしたが、開示データコードに代えて、当該QRコードQに付随する固有情報、例えば、誤り訂正レベル(L,M,Q,H)や型番(1〜40)を用いて暗号化データとを排他的論理和(EXOR)演算を行いその結果Sを求めても良い。なお、誤り訂正レベルや型番の詳細や仕様は、例えば、日本工業規格(JIS)の二次元コードシンボル−QRコード−基本仕様(JIS X 0510:2004)に従うようにしてもよい。 In step S507 described above, the disclosed data code and the encrypted data are subjected to exclusive OR (EXOR) operation in units of 2 bytes to obtain the result S, which is set to the seed value of the pseudo random number in step S509. However, instead of the disclosed data code, the unique information associated with the QR code Q, for example, the error correction level (L, M, Q, H) or the model number (1 to 40) is used to exclude the encrypted data. The logical sum (EXOR) operation may be performed and the result S may be obtained. The details and specifications of the error correction level and model number may be in accordance with, for example, the Japanese Industrial Standard (JIS) two-dimensional code symbol-QR code-basic specification (JIS X 0510:2004).
ここで、図25に戻ると、ステップS500により所定の加工処理が終了した後は、続くステップS133により非公開データコードを付加され、さらにステップS134により非公開データコードが含まれているか否かを判断する処理が行われる。 Here, returning to FIG. 25, after the predetermined processing is completed in step S500, a secret data code is added in the following step S133, and it is further determined in step S134 whether or not the secret data code is included. A determination process is performed.
即ち、ステップS134では、非公開データコードが含まれている場合には(S134;Yes)、前述したステップS132によりパディングコードが既に付加されていることから、続くステップS135によるパディングコードの付加が不要となる。このため、このような場合には、ステップS135による処理をスキップしてステップS137に処理を移行する。これに対し、非公開データコードが含まれていない場合、つまり開示データコードのみの場合には(S134;No)、まだパディングコードが付加されていないため、続くステップS135によりパディングコードを付加してから、ステップS137に処理を移行することとなる。 That is, if the private data code is included in step S134 (S134; Yes), the padding code is already added in step S132 described above, and thus the padding code is not added in subsequent step S135. Becomes Therefore, in such a case, the process of step S135 is skipped and the process proceeds to step S137. On the other hand, when the private data code is not included, that is, when only the disclosure data code is included (S134; No), since the padding code is not added yet, the padding code is added in the following step S135. Therefore, the process proceeds to step S137.
そして、ステップS137により、誤り訂正コード語であるRS符号を付加する処理が行われると、図27(A)〜(C)に示すフォーマットのデータコードが生成されるため、続くステップS139によりこのようなデータコードに基づいて各セルを生成して図17に示して説明したデータブロックに配置される。 Then, when the process of adding the RS code, which is the error correction code word, is performed in step S137, the data code in the format shown in FIGS. 27A to 27C is generated. Each cell is generated based on the data code and is arranged in the data block shown and described in FIG.
以上説明したように、本第5実施形態に係るプリンタ10によると、MPU11により実行されるコード生成処理によって生成されるQRコードQでは、ステップS500による加工処理により非公開データコードに所定の加工を施して、終端識別コードの後、または終端識別情報により特定される終端位置の後、に配置する。これにより、非公開データコードは、所定の加工を施されて当該非公開データコードの存在がわからないように加工されているので、たとえ終端識別コードの後等を読み取る試みがなされても、非公開データコードが配置されていることすらわからないので、セキュリティの強度を一層高めることが可能となる。
As described above, according to the
なお、上述した第5実施形態では、ステップS113の後に、開示データおよび非公開データを並び替える処理(図15に示すS115相当)を介在させていないが、印刷データに、第三者に開示するデータ(開示データ)と、第三者には秘密にして隠しておきたいデータ(非公開データ)と、が含まれており、これらがデータレコード中で混在している場合に、ステップS111により受信した「非公開データのデータレコード中の位置関係を示す位置情報」に基づいて、データの順番を入れ替えて、開示データの集まりと非公開データの集まりとに分ける処理を行ってもよい。これにより、例えば、PC1から送られてくる印刷データのレコードに、開示データA、非公開データα、開示データB、非公開データβの順に並ぶデータが含まれていた場合には、ステップS115により、開示データA、開示データB、非公開データα、非公開データβの順に並び替える処理を行うことにより、開示データと非公開データとがそれぞれまとめられるので、後のステップ121による終端識別コードの付加処理や、ステップS125による秘匿識別コードの付加処理等を容易に行うことができる。
In the fifth embodiment described above, after step S113, the process of rearranging the disclosed data and the non-public data (corresponding to S115 shown in FIG. 15) is not interposed, but the print data is disclosed to a third party. If the data (disclosure data) and the data that the third party wants to keep secret and hide (private data) are included and these are mixed in the data record, the data is received in step S111. Based on the above-mentioned “positional information indicating the positional relationship in the data record of the non-public data”, the order of the data may be exchanged and the processing may be divided into a collection of the disclosure data and a collection of the non-public data. As a result, for example, when the record of the print data sent from the
[第6実施形態]
次に、本発明の第6実施形態に係るリーダ20による他のQRコードのデコード処理を図28〜図30を参照して説明する。なお、ここで説明する他のQRコードは、図27(B)等を参照して前述したように、非公開データコードα,β等に所定の加工を施して空き領域に詰めるフォーマットを採るものである。
[Sixth Embodiment]
Next, another QR code decoding process by the
なお、図28に示すデコード処理のフローチャートにおいて、既に説明したデコード処理(図23)を構成する処理ステップと実質的に同一の処理ステップについては同一符号を付し詳細な説明を省略する。また、図29に示す復号化処理のフローチャートにおいて、既に説明した復号化処理(図24)を構成する処理ステップと実質的に同一の処理ステップについては同一符号を付し以下での詳細な説明を省略する。 In the flowchart of the decoding process shown in FIG. 28, the same reference numerals are given to the processing steps that are substantially the same as the processing steps that configure the decoding processing (FIG. 23) already described, and detailed description thereof will be omitted. Further, in the flowchart of the decoding process shown in FIG. 29, the same reference numerals are given to the processing steps that are substantially the same as the processing steps that constitute the decoding process (FIG. 24) already described, and the detailed description thereof will be given below. Omit it.
図28に示すように、デコード処理は、リーダ20の電源投入により起動する制御回路40およびメモリ35によって開始され、ステップS201により初期設定処理が行われると、ステップS205により所定時間を経過した後(S205;Yes)、またはステップS209により復号キーを受信した後(S209;Yes)、ステップS213により画像データを取得する。そして、ステップS215,S217,S219,S221によりQRコードQを画像認識してステップS223により誤り訂正可能であるか否かを判断して、誤り訂正可能であると判断できる場合には(S223;OK)、誤り訂正をした後、ステップS300”により復号化処理(図29)を行う。その後、全ての二次元コードについて復号化処理を終了したか否かを判別する(S350)。その結果、全ての二次元コードについて復号化処理を終了した場合には、ステップS300を終えてデコード処理を終了させる。一方、全ての二次元コードについて復号化処理を終了していない場合には、再度ステップS201に移行し、これ以降の処理動作を繰り返し実行する。
As shown in FIG. 28, the decoding process is started by the
図29に示すように、ステップS300”の復号化処理では、ステップS301〜S313により終端位置(開示データコードがなすコード列の終端位置で、終端識別コードまたは終端位置データにより特定可能なもの)が見つかると(S305’;Yes)、ステップS315,S317,S319によりカウンタnが指すn番目のデータコードを取得してそれが秘匿識別コードであるか否かをステップS321により判断する。そして、秘匿識別コードであると判断すると(S321;Yes)、ステップS320へ移行し、関連コード情報が含まれているか否か判別を行う。この判別の結果、関連コード情報が含まれている場合には、その関連コード情報の取得処理を行った上で(S320´)、ステップS323へ移行する。一方、関連コード情報が含まれていない場合には、そのままステップS323へ移行する。続くステップS323によりコード数jを取得した後、ステップS600による所定の抽出処理が行われる。 As shown in FIG. 29, in the decoding process of step S300″, the end position (the end position of the code string formed by the disclosed data code, which can be specified by the end identification code or the end position data) is determined in steps S301 to S313. If found (S305'; Yes), the n-th data code indicated by the counter n is acquired in steps S315, S317, and S319, and it is determined in step S321 whether or not the data code is the confidential identification code. If it is determined that the code is a code (S321; Yes), the process proceeds to step S320, and it is determined whether or not the related code information is included. After performing the acquisition processing of the related code information (S320'), the process proceeds to step S323. On the other hand, if the related code information is not included, the process proceeds to step S323 as it is. After acquiring, the predetermined extraction processing in step S600 is performed.
なお、ステップS321により秘匿識別コードが配置されていると判断した場合には、例えば、ホストコンピュータHSTに対して当該QRコードQには、秘匿識別コードが配置されている旨を通知するように構成してもよい。これにより、ホストコンピュータHSTでは、終端識別コードよりも後方のデータコードが非公開データコードである旨を把握することが可能となる。また、本来、パディングコードしか配置されない終端識別コードの後のコード領域(コード領域の空き部分)に、パディングコード以外のもので非公開データコードではないもの(例えばデータ化けによりパディングコードに該当しなくなったもの)が配置されている場合には、非公開データコードである旨の情報がホストコンピュータHSTに対して出力されないので、非公開データコード以外のものをデコードすることで生じ得る誤動作を防止することが可能となる。 When it is determined in step S321 that the confidential identification code is placed, for example, the host computer HST is notified that the QR code Q has the confidential identification code. You may. As a result, the host computer HST can recognize that the data code behind the end identification code is a private data code. Originally, only the padding code is placed in the code area after the end identification code (empty part of the code area) other than the padding code, which is not a private data code (for example, it becomes a padding code due to garbled data). Information that is a private data code is not output to the host computer HST, a malfunction that may occur by decoding something other than the private data code is prevented. It becomes possible.
ここで、ステップS600による所定の抽出処理を図30を参照して説明する。なお、図30に示す所定の抽出処理は、既に第5実施形態で説明した所定の加工処理(図26)と情報処理の内容が類似しているので、所定の加工処理を構成する処理ステップと実質的に同一の処理ステップについては同一符号を付し以下での詳細な説明を省略する。 Here, the predetermined extraction processing in step S600 will be described with reference to FIG. Since the predetermined extraction processing shown in FIG. 30 is similar in content of information processing to the predetermined processing processing (FIG. 26) which has already been described in the fifth embodiment, the processing steps constituting the predetermined processing processing are the same. The substantially same processing steps are designated by the same reference numerals, and detailed description thereof will be omitted below.
図30に示すように、所定の抽出処理では、ステップS501によりポインタiをゼロクリアする処理、ステップS503により終端位置よりも後に存在する空き領域のビット数n(図27(A)〜(C)参照)を求める処理、ステップS505により暗号化データのビット数と復号キー検査データのビット数との和m(図27(D),(E)参照)を求める処理、ステップS507により開示データコードと暗号化データとを2バイト単位で排他的論理和(EXOR)演算を行いその結果Sを求める処理、がそれぞれ順番に行われ、続くステップS509により疑似乱数のシード値にセットする処理が行われる。 As shown in FIG. 30, in the predetermined extraction processing, the pointer i is zero-cleared in step S501, and the number of bits n of the empty area existing after the end position in step S503 (see FIGS. 27A to 27C). ), a process of obtaining the sum m (see FIGS. 27D and 27E) of the number of bits of the encrypted data and the number of bits of the decryption key check data in step S505, and the disclosure data code and the encryption in step S507. A process of performing an exclusive OR (EXOR) operation on the united data with a unit of 2 bytes to obtain the result S is sequentially performed, and in a subsequent step S509, a process of setting a seed value of the pseudo random number is performed.
このステップS509によりセットされるシード値は、第5実施形態で説明したように、所定の演算により疑似乱数を発生させるための種であり、このシード値が同じであれば、発生する乱数はまったく同一のものとなる。このため、同一のQRコードQであれば、所定の加工処理(図26)のシード値と本抽出処理のシード値とは、同じ値となり、次のステップS513による疑似乱数の値およびその発生順も同じになる。 The seed value set in step S509 is a seed for generating a pseudo-random number by a predetermined calculation, as described in the fifth embodiment, and if the seed values are the same, the generated random number is completely random. Will be the same. Therefore, if the QR code Q is the same, the seed value of the predetermined processing (FIG. 26) and the seed value of the main extraction processing are the same value, and the pseudo random number value in the next step S513 and its generation order are obtained. Will be the same.
ステップS513により疑似乱数Rを求める処理が行われ、ステップS515により既に発生した疑似乱数Rと同じ値であると判断されない場合には(S515;No)、続くステップS617により、空き領域のRビット目の値を暗号化データバッファのiビット目(ポインタiが指し示すビットの位置)にセットする処理が行われる。 If the pseudo random number R is processed in step S513 and it is not determined in step S515 that it has the same value as the already generated pseudo random number R (S515; No), then in step S617, the R-th bit of the empty area is determined. Is set in the i-th bit of the encrypted data buffer (the position of the bit pointed by the pointer i).
即ち、第5実施形態の所定の加工処理では、ステップS517により、暗号化データのiビット目(ポインタiが指し示すビットの位置)の値を空き領域のRビット目にセットする処理を行うことによって、例えば、1ビット目の値を空き領域のRビット目にセットしたが、本抽出処理のステップS617では、これとは逆に、空き領域のRビット目の値を暗号化データバッファのiビット目(ポインタiが指し示すビットの位置)にセットし、例えば、空き領域のRビット目の値を暗号化データバッファの1ビット目にセットする。 That is, in the predetermined processing according to the fifth embodiment, the value of the i-th bit (the position of the bit pointed by the pointer i) of the encrypted data is set to the R-th bit of the empty area in step S517. For example, the value of the 1st bit is set to the R bit of the free area, but in step S617 of this extraction processing, conversely, the value of the R bit of the empty area is set to the i bit of the encrypted data buffer. It is set to the eye (the position of the bit pointed by the pointer i), and for example, the value of the Rth bit of the empty area is set to the first bit of the encrypted data buffer.
これにより、第5実施形態の所定の加工処理により空き領域のRビット目にセットされた暗号化データのiビット目の値は、本抽出処理によって、暗号化データバッファのiビット目にセットされるので、ビット単位でバラバラに分解された非公開データコード片等を元通りに復元することができる。つまり、ステップS617等では集約復元処理ができる。 As a result, the value of the i-th bit of the encrypted data set in the R-th bit of the empty area by the predetermined processing of the fifth embodiment is set in the i-th bit of the encrypted data buffer by the main extraction processing. As a result, it is possible to restore the private data code pieces and the like that have been disassembled into individual pieces in units of bits. That is, the aggregate restoration process can be performed in step S617 and the like.
そして、ステップS519により、ポインタiと非公開データコードの全ビット数とが一致している場合には、非公開データコードの全てのビットが前述したステップS507〜517による集約復元処理が施されていることになるので(S519;Yes)、本加工処理を終了する。一方、ポインタiと非公開データコードの全ビット数とが一致していない場合には、非公開データコードにはまだ復元処理が施されていないビットが残存することになるので(S519;No)、ステップS511によりポインタiをカウントアップして再度ステップS513による疑似乱数発生処理を行う。 Then, in step S519, when the pointer i and the total number of bits of the secret data code match, all the bits of the secret data code are subjected to the aggregation/restoration processing in steps S507 to 517 described above. Since this means that the processing has been completed (S519; Yes), this processing is terminated. On the other hand, if the pointer i and the total number of bits of the private data code do not match, the private data code has some bits that have not been restored (S519; No). The pointer i is counted up in step S511, and the pseudo random number generation process in step S513 is performed again.
ここで、図29に戻ると、ステップS600により所定の抽出処理が終了した後、ステップS325により文字数(j)分だけデータコードを取得し、続くステップS329’によりj番目の復号キー検査データ(鍵特定情報)を取得する。 Here, returning to FIG. 29, after the predetermined extraction processing is completed in step S600, the data code for the number of characters (j) is acquired in step S325, and the j-th decryption key check data (key Get specific information).
そして、ステップS329’により取得した復号キー検査データに基づいて、先のステップS209によりホストコンピュータHSTから受信した復号キーがこのj番目の非公開データコードの暗号化データを解読する鍵として適合しているか否かの判断をステップS331により行う。当該復号キーが適合していると判断した場合には(S331;Yes)、続くステップS333により暗号化データを解読する。 Then, based on the decryption key check data obtained in step S329', the decryption key received from the host computer HST in step S209 is matched as a key for decrypting the encrypted data of the j-th private data code. Whether or not there is is determined in step S331. When it is determined that the decryption key is suitable (S331; Yes), the encrypted data is decrypted in the subsequent step S333.
一方、ステップS331に当該復号キーが適合していると判断できない場合には(S331;No)、当該n番目の非公開データコードを解読することなく、本復号化処理を終了する。ステップS335により、非公開データコードを復号する処理が行われると、図28に示すステップS300”を終え、全ての二次元コードについて復号化処理を終了したか否かを判別する(S350)。その結果、全ての二次元コードについて復号化処理を終了した場合には、ステップS300を終えてデコード処理を終了させる。一方、全ての二次元コードについて復号化処理を終了していない場合には、再度ステップS201に移行し、これ以降の処理動作を繰り返し実行する。てデコード処理を終了する。 On the other hand, if it cannot be determined in step S331 that the decryption key is suitable (S331; No), the decryption process is terminated without decrypting the n-th private data code. When the process of decoding the private data code is performed in step S335, step S300″ shown in FIG. 28 is ended, and it is determined whether or not the decoding process has been completed for all the two-dimensional codes (S350). As a result, when the decoding process is completed for all the two-dimensional codes, step S300 is ended and the decoding process is ended, while when the decoding process is not completed for all the two-dimensional codes, The process proceeds to step S201, and the subsequent processing operations are repeatedly executed, and the decoding process ends.
なお、本抽出処理では、このようなステップS507〜S617による集約復元処理に代えて、例えば、ビット位置を逆方向に変換可能なビット位置逆変換テーブルに基づくビットの並替えでもよい。具体的には、例えば、第5実施形態で説明したビット位置逆変換テーブルにおいては、1ビット目を3ビット目に、2ビット目を4ビット目に、3ビット目を8ビット目に、4ビット目を1ビット目に、5ビット目を12ビット目に、6ビット目を10ビット目に、7ビット目を15ビット目に、8ビット目を7ビット目に、9ビット目を13ビット目に、10ビット目を9ビット目に、11ビット目を6ビット目に、12ビット目を11ビット目に、13ビット目を2ビット目に、14ビット目を16ビット目に、15ビット目を5ビット目に、16ビット目を14ビット目に、それぞれ位置を変換するビット位置逆変換テーブルを設けその逆変換規則に従ってビット位置を変換する。これにより、例えば、16ビット構成のデータ「0101101101100001」(5A61h)は、元の「1001011011010110」(96D6h)に変換される。
In the main extraction process, instead of the aggregation/restoration process in steps S507 to S617, for example, bits may be rearranged based on a bit position reverse conversion table that can convert bit positions in the reverse direction. Specifically, for example, in the bit position reverse conversion table described in the fifth embodiment, the first bit is the third bit, the second bit is the fourth bit, the third bit is the eighth bit, and the fourth bit is the fourth bit.
また、このようなビット位置逆変換テーブルを通すことに代えて、非公開データコードを構成するビットにより特定されるデータ値を逆方向に変換可能なデータ値逆変換テーブルを用いても良い。例えば、第5実施形態で説明したデータ値変換テーブルの例においては、16進表記のデータ「96D6h」が「5A61h」に変換されることから、これを逆方向の、「5A61h」を「96D6h」に逆変換可能な所定のデータ値逆変換テーブルに基づいて変換することで、復元処理を行うことができる。 Further, instead of passing through such a bit position reverse conversion table, a data value reverse conversion table capable of converting the data value specified by the bits forming the private data code in the reverse direction may be used. For example, in the example of the data value conversion table described in the fifth embodiment, since the hexadecimal notation data “96D6h” is converted to “5A61h”, this is reversed, and “5A61h” is changed to “96D6h”. By performing conversion based on a predetermined data value reverse conversion table that can be reverse-converted to, the restoration process can be performed.
さらに、このようなビット位置逆変換テーブルを通すことに代えて、非公開データコードを構成するビットにより特定されるデータ値を逆方向に変換可能なデータ値逆変換式を用いても良い。例えば、第5実施形態で説明した所定のデータ値変換式の例においては、入力データXを2倍にしてから1を減算して出力Y(=X×2−1)しているので、これとは逆に、入力データX’に1を加算した結果を2で除算して出力Y’(=(X’+1)/2)することで、復元処理ができる。 Further, instead of passing through such a bit position reverse conversion table, a data value reverse conversion formula capable of converting the data value specified by the bits forming the private data code in the reverse direction may be used. For example, in the example of the predetermined data value conversion formula described in the fifth embodiment, since the input data X is doubled and 1 is subtracted to output Y (=X×2-1), On the contrary, the restoration process can be performed by dividing the result of adding 1 to the input data X′ by 2 and outputting Y′ (=(X′+1)/2).
さらに、第5実施形態で説明した循環シフトレジスタを通す場合に対しては、所定の加工処理とは逆方向にシフトする循環シフトレジスタを復元処理に用いることで、復元処理ができる。例えば、先の16ビット構成のデータ例では、所定の加工処理においてLSB側に4ビットシフトさせることで「1001011011010110」(96D6h)を「0110100101101101」(696Dh)に変換したので、これを、復元処理では、逆方向のMSB側に4ビットシフトさせることで、「1001011011010110」(96D6h)というように元に戻すことができる。 Further, in the case of passing through the circular shift register described in the fifth embodiment, the restoration process can be performed by using the circular shift register that shifts in the direction opposite to the predetermined processing process for the restoration process. For example, in the above 16-bit data example, "1001011011010110" (96D6h) is converted to "0110100101101101" (696Dh) by shifting the LSB side by 4 bits in the predetermined processing, so this is restored in the restoration processing. , By shifting the MSB side in the opposite direction by 4 bits, it can be returned to the original state such as “1001011011010110” (96D6h).
なお、ステップS509によりセットされる疑似乱数のシード値については、第5実施形態と同様に、当該QRコードQに付随する固有情報、例えば、誤り訂正レベル(L,M,Q,H)や型番(1〜40)を用いて暗号化データとを排他的論理和(EXOR)演算を行いその結果Sを求めてもよい。なお、誤り訂正レベルや型番の詳細や仕様は、例えば、日本工業規格(JIS)の二次元コードシンボル−QRコード−基本仕様(JIS X 0510:2004)に従う。 The pseudo random number seed value set in step S509 is, as in the fifth embodiment, unique information associated with the QR code Q, such as the error correction level (L, M, Q, H) or the model number. An exclusive OR (EXOR) operation may be performed on the encrypted data using (1-40) to obtain the result S. The details and specifications of the error correction level and model number follow, for example, the two-dimensional code symbol of the Japanese Industrial Standard (JIS)-QR code-basic specification (JIS X 0510:2004).
なお、ステップS303〜S313では、終端位置の前方に配置されて元来デコードされる通常のデータコード(開示データコード)を取得してデコードする処理が行われる。 Note that in steps S303 to S313, a process of acquiring and decoding a normal data code (disclosed data code) that is arranged in front of the end position and originally decoded is performed.
また、ステップS321では、ステップS319により取得されたn番目のデータコードが、秘匿識別コードであるか否かを判断する処理が行われる。 In step S321, a process of determining whether or not the nth data code acquired in step S319 is a secret identification code is performed.
さらに、ステップS319,S323〜S335では、終端位置の後方に配置されて、本来はデコードされないデータコード(非公開データコード)を取得してデコードする処理が行われる。 Further, in steps S319 and S323 to S335, a process of acquiring and decoding a data code (private data code) that is arranged behind the end position and is not originally decoded is performed.
以上説明したように、本第6実施形態に係るリーダ20によると、本来、データコードが配置されない終端識別コードの後のコード領域(コード領域の空き部分)等に、所定の加工が施された非公開データコードが配置されていても、この非公開データコードをデコードすることができる。したがって、コード語を配置すべきコード領域の空き部分に存在するデータコードをデコードすることができる。
As described above, according to the
また、上述したデコード処理では、ステップS329’によりj番目の復号キー検査データを取得するように構成したが、例えば、第5実施形態で述べたように、ステップS113の後に、開示データおよび非公開データを並び替える処理(図15に示すS115相当)を介在させて、ステップS111により受信した「非公開データのデータレコード中の位置関係を示す位置情報」に基づいて、データの順番を入れ替えて、開示データの集まりと非公開データの集まりとに分ける処理を行った場合には、ステップS329’に代えて、非公開データコードから「開始桁」を分離してこの分離された「開始桁」に基づいて非公開データコードを復号(デコード)した非公開データをコード化される前のデータレコード中の位置関係に配置するように構成してもよい。 In the decoding process described above, the j-th decryption key check data is acquired in step S329′, but, for example, as described in the fifth embodiment, after the step S113, the disclosure data and the private data are not disclosed. By interposing a process of rearranging the data (corresponding to S115 shown in FIG. 15), the order of the data is changed based on the "positional information indicating the positional relationship in the data record of the private data" received in step S111. When the process of dividing into the collection of the disclosed data and the collection of the non-public data is performed, the “start digit” is separated from the non-public data code and the separated “start digit” is replaced with step S329′. Alternatively, the non-public data obtained by decoding the non-public data code may be arranged in the positional relationship in the data record before being encoded.
これにより、コード語としてコード化される前のデータレコード中の位置関係において前後して混在する場合であっても、デコードしたデータを、この位置情報に基づいてコード化前の位置関係に配置することが可能となる。この場合、「非公開データコードから「開始桁」を分離する」処理を実行する制御回路40等は、「位置情報分離手段」に相当する。また、「この分離された「開始桁」に基づいて非公開データコードを復号(デコード)した非公開データをコード化される前のデータレコード中の位置関係に配置する」処理を実行する制御回路40等は、「データ配置手段」に相当する。
As a result, even if the positional relationship in the data record before being coded as a code word is mixed before and after, the decoded data is arranged in the positional relationship before being coded based on this positional information. It becomes possible. In this case, the
[第7実施形態]
次に、本発明の第7実施形態に係るリーダ20によるQRコードQのデコード処理を図31および図32を参照して説明する。なお、ここで説明するQRコードQは、これまで第1実施形態〜第5実施形態において説明した各非公開データコードを含むQRコードを意味する。
[Seventh Embodiment]
Next, the decoding process of the QR code Q by the
なお、本第7実施形態では、デコード処理のフローチャートは図示しないが、図19、図23や図28に示されるステップS300,S300’,S300”の各復号処理を図31に示す復号処理に置き換えることで、これらのデコード処理を本第7実施形態に適用することが可能となる。また、図31に示す復号化処理のフローチャートにおいて、既に説明した復号化処理(図24)を構成する処理ステップと実質的に同一の処理ステップについては同一符号を付し以下での詳細な説明を省略する。 In addition, in the seventh embodiment, although the flowchart of the decoding process is not shown, each decoding process of steps S300, S300′, S300″ shown in FIGS. 19, 23 and 28 is replaced with the decoding process shown in FIG. This makes it possible to apply these decoding processes to the seventh embodiment. Further, in the flowchart of the decoding process shown in Fig. 31, the processing steps constituting the decoding process (Fig. 24) already described. Processing steps that are substantially the same as the above are denoted by the same reference numerals, and detailed description thereof will be omitted below.
図31に示すように、復号化処理は、S305’により終端位置(開示データコードがなすコード列の終端位置で、終端識別コードまたは終端位置データにより特定可能なもの)でないと判断すると(S305’;No)、ステップS307,S309により文字数i分のデータコードを取得した後、ステップS310により開示データコードをデコードするか否かを判断する。 As shown in FIG. 31, the decoding process determines in S305′ that it is not the end position (the end position of the code string formed by the disclosed data code, which can be identified by the end identification code or the end position data) (S305′). No), and after obtaining the data code for the number of characters i in steps S307 and S309, it is determined in step S310 whether or not the disclosed data code is to be decoded.
即ち、このステップS310では、後で図32を参照して説明する「読取フラグS」の状態((1) 開示データコードだけをデコードするフラグS=1、(2) 非公開データコードだけをデコードするフラグS=2、(3) 開示データコードと非公開データコードの双方をデータコードするフラグS=0)に基づいて、開示データコードを復号する情報が当該読取フラグSにセットされているか否かを判断する。この読取フラグSは、例えば、リーダ20を構成するメモリ35の所定領域またはレジスタに設定されるもので、後述する読取フラグ設定処理(図32参照)により設定される。
That is, in this step S310, the state of the "read flag S" described later with reference to FIG. 32 ((1) Decode only disclosed data code S=1, (2) Decode only private data code Flag S=2, (3) whether or not information for decoding the disclosed data code is set in the read flag S based on the flag S=0 which codes both the disclosed data code and the non-disclosed data code. To judge. The read flag S is set, for example, in a predetermined area or register of the
そして、(1) 開示データコードだけをデコードするフラグS=1、または(3) 開示データコードと非公開データコードの双方をデータコードするフラグS=0が読取フラグにセットされている場合)には(S310;Yes)、続くステップS311により開示データコードを復号する処理を行い、(2) 非公開データコードだけをデコードするフラグS=2が読取フラグにセットされている場合には(S310;No)、続くステップS311により開示データコードを復号する処理をスキップして、ステップS313,S303等により次のデータコードを取得する処理を行う。 Then, (1) if the flag S=1 that decodes only the disclosed data code or (3) if the flag S=0 that codes both the disclosed data code and the private data code is set in the read flag) (S310; Yes), the disclosed data code is decoded in the subsequent step S311, and (2) if the flag S=2 for decoding only the private data code is set in the read flag (S310; No), the process of decoding the disclosed data code is skipped in the subsequent step S311, and the process of acquiring the next data code is performed in steps S313 and S303.
一方、ステップS301〜S313により終端位置(開示データコードがなすコード列の終端位置で、終端識別コードまたは終端位置データにより特定可能なもの)が見つかると(S305’;Yes)、ステップS314により非公開データコードをデコードするか否かを判断する。 On the other hand, when the end position (the end position of the code string formed by the disclosed data code, which can be identified by the end identification code or the end position data) is found in steps S301 to S313 (S305'; Yes), it is closed in step S314. Determine whether to decode the data code.
即ち、このステップS314は、前述したステップS310とは反対に、非公開データコードをデコードするか否かを読取フラグSに基づいて判断する。つまり、(2) 非公開データコードだけをデコードするフラグS=2、または(3) 開示データコードと非公開データコードの双方をデータコードするフラグS=0が読取フラグにセットされている場合には(S314;Yes)、続くステップS315〜S335により非公開データコードを復号する処理を行い、(1) 開示データコードだけをデコードするフラグS=1が読取フラグにセットされている場合には(S314;No)、本復号処理を終了する。 That is, in the step S314, contrary to the above-described step S310, it is determined based on the read flag S whether or not the private data code is to be decoded. That is, when the read flag is set to (2) the flag S=2 that decodes only the private data code or (3) the flag S=0 that codes both the disclosed data code and the private data code. (S314; Yes), the process of decoding the private data code is performed in subsequent steps S315 to S335. (1) When the flag S=1 for decoding only the disclosed data code is set in the read flag ( S314; No), this decoding process ends.
ここで、読取フラグ設定処理を図32を参照して説明する。なお、この読取フラグ設定処理は、例えば、当該リーダ20を構成するハードウェアの各種設定状態(例えば、ビープ音のオンオフ、液晶表示器46のバックライトのオンオフ等)を変更、解除または初期化する場合に起動されるメンテナンスプログラムに含まれるもので、通常のデコード処理(図19、図23や図28)には含まれないものである。なおここでは、メンテナンスプログラムによるメンテナンス処理のフローチャートおよびその説明は省略する。
Here, the reading flag setting process will be described with reference to FIG. In the reading flag setting process, for example, various setting states of the hardware configuring the reader 20 (for example, beep sound on/off, backlight on/off of the
図32に示すように、読取フラグ設定処理では、まずステップS901により読取フラグSに0(S=0)をセットする等の所定の初期化処理を行った後、ステップS903によりタイマー値をクリアする処理が行われる。このタイマーは、次のステップS905により所定時間を経過したか否かを判断するためにカウントされるものである。 As shown in FIG. 32, in the read flag setting process, first, a predetermined initialization process such as setting the read flag S to 0 (S=0) is performed in step S901, and then the timer value is cleared in step S903. Processing is performed. This timer is counted to determine whether or not a predetermined time has elapsed in the next step S905.
そして、ステップS905により所定時間を経過していないと判断した場合には(S905;No)、続くステップS907によりコマンドを受信したか否かを判断する処理が行われる。このコマンドは、例えば、前述したメンテナンスプログラムにおいて、ホストコンピュータHSTから受信したり、当該リーダ20を構成する操作スイッチ42から入力されたりするものである。
Then, if it is determined in step S905 that the predetermined time has not elapsed (S905; No), a process of determining whether or not a command is received is performed in subsequent step S907. This command is, for example, received from the host computer HST or input from the
ステップS907によりコマンドを受信したと判断しない(受信していないと判断した)場合には(S907;No)、ステップS905により再び所定時間を経過しているか否かを判断する。これに対し、コマンドを受信したと判断した場合には(S907;Yes)、続くステップS909により受信したコマンドの内容を判断する処理が行われることとなる。 If it is not determined in step S907 that the command has been received (it is determined that it has not been received) (S907; No), it is determined again in step S905 whether the predetermined time has elapsed. On the other hand, when it is determined that the command has been received (S907; Yes), a process of determining the content of the received command is performed in the subsequent step S909.
即ち、ステップS909により、当該コマンドが(1) 開示データコードだけをデコードするものである場合には、ステップS911により読取フラグSに「1」をセットし(S=1)、当該コマンドが(2) 非公開データコードだけをデコードするものである場合には、ステップS913により読取フラグSに「2」をセットする(S=2)。これに対し、当該コマンドがこれらのいずれでもない場合には、読取フラグSを「0」のままにして、本読取フラグ設定処理を終了する。つまり、この場合には、前述したステップS901によりデフォルトで設定されている「0」をそのまま引き継ぐことで、(3) 開示データコードと非公開データコードの双方をデータコードする読取フラグSを維持する。 That is, in step S909, when the command is (1) decoding only the disclosed data code, the reading flag S is set to "1" (S=1) in step S911, and the command is (2 ) If only the private data code is to be decoded, the reading flag S is set to "2" in step S913 (S=2). On the other hand, if the command is not one of these commands, the read flag S is left at "0" and the read flag setting process ends. In other words, in this case, the default flag "0" set in step S901 is taken over as it is, and (3) the read flag S for data-coding both the disclosed data code and the private data code is maintained. ..
ステップS911,S913により読取フラグがセットされると、本読取フラグ設定処理を終了する。 When the reading flag is set in steps S911 and S913, the reading flag setting process ends.
以上説明したように、本第7実施形態に係るリーダ20によると、当該リーダ20の使用者は、開示データコードをデコードするか、非公開データコードをデコードするか、の少なくとも一方を選択することができるので、例えば、非公開データコードは読んでも開示データコードを読みたくない場合や、それとは逆に、開示データコードは読んでも非公開データコードを読みたくない場合に、不要なデコード処理によるデコード時間を削減することができる。したがって、デコード時間を短縮することが可能となる。
As described above, according to the
なお、上述した実施形態のなかには、例えば、第1実施形態(図15)や第3実施形態(図21)で説明したように、コード生成処理のステップS119において誤り訂正コード語であるRS符号を生成しているものがあるが、必ずしもこのステップS119で誤り訂正コード語であるRS符号を生成する必要はなく、例えば、当該ステップS119に相当する処理(RS符号生成処理)を、誤り訂正コード語であるRS符号を付加する処理(ステップS137)とともにまたはその前段階で実行するように、コード生成処理の流れを構成するようにしてもよい。 Note that, in the above-described embodiments, for example, as described in the first embodiment (FIG. 15) and the third embodiment (FIG. 21), the RS code that is the error correction code word is added in step S119 of the code generation process. Although some have been generated, it is not always necessary to generate the RS code that is the error correction code word in this step S119. For example, the process corresponding to step S119 (RS code generation process) is The flow of the code generation process may be configured to be executed together with the process of adding the RS code (step S137) or before the process.
以上、QRコードを例にとり、第1実施形態〜第7実施形態について関連二次元コードを適用する例について説明をした。 The example of applying the related two-dimensional code to the first to seventh embodiments has been described above by taking the QR code as an example.
このようなかかる場合には、第1実施形態〜第7実施形態において説明したQRコードの生成方法と同様に、二次元コードとしてのQRコードを生成するが、これを複数回実行するその結果、複数の関連二次元コードが生成されることとなる。このとき、図33(D)に示すように非公開データコードを配置する際に、上述した関連コード情報を当該非公開データコードに含ませる。 In such a case, a QR code as a two-dimensional code is generated in the same manner as the QR code generation method described in the first to seventh embodiments, but as a result of executing this QR code a plurality of times, A plurality of related two-dimensional codes will be generated. At this time, when the private data code is arranged as shown in FIG. 33D, the related code information described above is included in the private data code.
関連コード情報が非公開データコードに含まれているため(つまり、関連コード情報が隠蔽されているため)、標準デコーダで関連QRコードを読み込んだ際に、標準デコーダは当該QRコードが関連QRコードであることを把握することができない(言い換えれば、通常のQRコードと認識する)。そして、非公開データコードを取り扱うことができる拡張デコーダ70で読み込むことにより、初めて当該QRコードが関連QRコードであることを認識することが可能となる。
Since the related code information is included in the private data code (that is, the related code information is hidden), when the standard decoder reads the related QR code, the standard decoder determines that the relevant QR code is the related QR code. Can not be understood (in other words, it is recognized as a normal QR code). Then, it is possible to recognize that the QR code is a related QR code for the first time by reading it with the
第1実施形態〜第7実施形態において説明したQRコードについて関連二次元コードを適用する場合には、二次元コードを評価する際も同様である。前記関連二次元コードから前記非公開データコードを抽出する方法は、上述の通りである。このとき前記非公開データコードから前記関連コード情報を取り出す。関連コード情報の取り出し方法も上述の通りである。このような関連コード情報取り出し処理を、読み取った前記複数の関連二次元コードの各々に対して実行する。 When the related two-dimensional code is applied to the QR code described in the first to seventh embodiments, the same applies when evaluating the two-dimensional code. The method of extracting the private data code from the related two-dimensional code is as described above. At this time, the related code information is extracted from the private data code. The method of extracting the related code information is also as described above. Such related code information extraction processing is executed for each of the read plurality of related two-dimensional codes.
関連二次元コードの生成は、複数回行えばよいことから3回以上にわたって行うことで3つの関連二次元コードの生成が可能となる。その結果、3枚以上の関連二次元コードを互いに関連付けられていることを確認するアプリケーションに適用することが可能となる。 Since it is sufficient to generate the related two-dimensional code a plurality of times, it is possible to generate three related two-dimensional codes by performing it three times or more. As a result, it becomes possible to apply to an application that confirms that three or more related two-dimensional codes are associated with each other.
次に複数の関連二次元コードの各々から取得された前記関連コード情報に基づいて、前記複数の関連二次元コードが互いに関連付けられていることを評価する。この評価方法も上述の通りであるため以下での説明を省略する。 Next, it is evaluated that the plurality of related two-dimensional codes are associated with each other based on the related code information acquired from each of the plurality of related two-dimensional codes. Since this evaluation method is also as described above, the description below is omitted.
また、図33(E)に示すように関連コード情報は、終端子と秘匿識別子の間に配置してもよいし、秘匿識別子の中に配置してもよい。また、図33(F)に示すように関連コード情報は、秘匿識別子とデータ長情報の間に配置してもよいし、データ長情報の中に配置してもよい。つまり、この関連コード情報を非公開データコードに含ませる代わりに前記秘匿識別コード内又はその前か後、或いはデータ長情報内又はその前か後に含ませるようにしてもよい。 Further, as shown in FIG. 33(E), the related code information may be arranged between the terminator and the secret identifier, or may be arranged in the secret identifier. Further, as shown in FIG. 33(F), the related code information may be arranged between the secret identifier and the data length information, or may be arranged in the data length information. That is, the related code information may be included in the secret identification code or before or after it, or in the data length information or before or after it, instead of being included in the secret data code.
このとき、秘匿識別子は、必須であるが、データ長情報は省略するようにしてもよい。データ長情報を省略する場合には、図33(E)に示すように、データ長情報自体を設けない構成となる。 At this time, the secret identifier is indispensable, but the data length information may be omitted. When the data length information is omitted, the data length information itself is not provided as shown in FIG.
かかる場合も上述した処理動作を同様に実行することで上述した本発明所期の効果を得ることができることは勿論である。 Even in such a case, it is needless to say that the desired effect of the present invention described above can be obtained by executing the processing operation described above in the same manner.
1 パソコン
10 QRコードプリンタ
11 MPU
12、35 メモリ
20 QRコードリーダ(二次元コードの読取装置)
40 制御回路
1
12, 35
40 control circuit
Claims (10)
開示するデータを表すコード語としてコード化された開示データコードの総数が、コード語を配置すべきコード領域に収容可能な容量に満たない場合、前記コード領域に配置された前記開示データコードがなすコード列の終端を示す終端識別コードをこのコード列の最後に配置するとともに、前記コード領域の空き部分にデータを表さないパディングコードを配置し、秘匿するデータを表すコード語としてコード化された非公開データコードを前記パディングコードの一部または全部に代えて、前記終端識別コードの後に配置する二次元コードの生成工程を、複数回実行することにより、前記複数の関連二次元コードの各々を生成し、
各々の前記生成工程において前記非公開データコードを配置する際に、前記複数の関連二次元コードが互いに関連付けられていることを特定可能とするための関連コード情報を前記非公開データコードに含ませること
を特徴とする二次元コードの生成方法。 A two-dimensional code generation method for generating a plurality of related two-dimensional codes associated with each other, comprising:
When the total number of disclosure data codes encoded as code words representing the disclosed data is less than the capacity that can be accommodated in the code area in which the code word is to be arranged, the disclosure data code arranged in the code area makes An end identification code indicating the end of the code string is placed at the end of this code string, and a padding code that does not represent data is placed in the empty part of the code area, and is encoded as a code word that represents secret data. By replacing the secret data code with a part or all of the padding code and performing a step of generating a two-dimensional code that is arranged after the terminal identification code, a plurality of related two-dimensional codes are generated by executing the step of generating the two-dimensional code a plurality of times. Generate,
When arranging the non-public data code in each of the generation steps, the non-public data code includes related code information for making it possible to specify that the plurality of related two-dimensional codes are associated with each other. A method for generating a two-dimensional code characterized by the following.
各々の前記生成工程において前記非公開データコードを配置する際に、前記関連コード情報を前記非公開データコードに含ませる代わりに前記秘匿識別コード内又はその前か後に含ませること
を特徴とする請求項1記載の二次元コードの生成方法。 Between the terminal identification code and the private data code, a confidential identification code indicating that the subsequent data code is the private data code is arranged,
When the private data code is arranged in each of the generating steps, the related code information is included in the confidential identification code, or before or after the private identification code, instead of being included in the private data code. Item 2. A method for generating a two-dimensional code according to item 1.
各々の前記生成工程において前記非公開データコードを配置する際に、前記関連コード情報を前記非公開データコードに含ませる代わりに前記秘匿識別コード内又はその前か後、或いはデータ長情報内又はその前か後に含ませること
を特徴とする請求項2記載の二次元コードの生成方法。 Between the terminal identification code and the private data code, data length information obtained by coding the data length of the private data code is further arranged,
When arranging the non-public data code in each of the generating steps, instead of including the related code information in the non-public data code, in the secret identification code or before or after the secret identification code, or in the data length information or the The method for generating a two-dimensional code according to claim 2, wherein the method is included before or after.
前記関連コード情報は、
二次元コードが関連二次元コードであるか否かを示す識別情報と、
互いに関連付けられた複数の関連二次元コードの連鎖数を示す連鎖数情報と、
前記関連コード情報を備える関連二次元コードが、前記連鎖数分の関連二次元コードのうちの何番目の関連二次元コードであるかを示す序列番号情報と、
前記関連コード情報を備える関連二次元コードが、該関連二次元コードと序列番号が異なる他の関連二次元コードと関連付けられているか否かを示す指標情報と、
を有することを特徴とする二次元コードの生成方法。 The two-dimensional code generation method according to claim 1, wherein
The related code information is
Identification information indicating whether the two-dimensional code is a related two-dimensional code,
Chain number information indicating the number of chains of a plurality of related two-dimensional codes associated with each other,
A related two-dimensional code comprising the related code information, and a sequence number information indicating what number of the related two-dimensional code of the number of chains the related two-dimensional code,
Related two-dimensional code comprising the related code information, index information indicating whether or not the related two-dimensional code is associated with another related two-dimensional code having a different order number from the related two-dimensional code,
A method for generating a two-dimensional code, which comprises:
前記関連二次元コードから前記非公開データコードを抽出し、前記非公開データコードから前記関連コード情報を取り出す関連コード情報取り出し処理を、読み取った前記複数の関連二次元コードの各々に対して実行する取り出し工程と、
前記複数の関連二次元コードの各々から取得された前記関連コード情報に基づいて、前記複数の関連二次元コードが互いに関連付けられていることを評価する評価工程と、を有することを特徴とする二次元コード評価方法。 A two-dimensional code evaluation method that reads a plurality of related two-dimensional codes generated by the two-dimensional code generation method according to claim 1, and evaluates that the plurality of related two-dimensional codes are associated with each other. ,
A related code information extraction process of extracting the private data code from the related two-dimensional code and extracting the related code information from the private data code is executed for each of the read plurality of related two-dimensional codes. With the removal process,
An evaluation step of evaluating that the plurality of related two-dimensional codes are related to each other based on the related code information acquired from each of the plurality of related two-dimensional codes. Dimension code evaluation method.
前記関連二次元コードから前記関連コード情報が含められた前記秘匿識別コード又はデータ長情報を抽出して当該関連コード情報を取り出す関連コード情報取り出し処理を、読み取った前記複数の関連二次元コードの各々に対して実行する取り出し工程と、
前記複数の関連二次元コードの各々から取得された前記関連コード情報に基づいて、前記複数の関連二次元コードが互いに関連付けられていることを評価する評価工程と、を有することを特徴とする二次元コード評価方法。 A two-dimensional code evaluation method that reads a plurality of related two-dimensional codes generated by the two-dimensional code generation method according to claim 5 and evaluates that the plurality of related two-dimensional codes are associated with each other. ,
Related code information extraction processing for extracting the confidential identification code or data length information including the related code information from the related two-dimensional code and extracting the related code information, each of the plurality of read related two-dimensional codes A take-out step to be performed for
An evaluation step of evaluating that the plurality of related two-dimensional codes are related to each other based on the related code information acquired from each of the plurality of related two-dimensional codes. Dimension code evaluation method.
前記関連コード情報は、
二次元コードが関連二次元コードであるか否かを示す識別情報と、
互いに関連付けられた複数の関連二次元コードの連鎖数を示す連鎖数情報と、
前記関連コード情報を備える関連二次元コードが、前記連鎖数分の関連二次元コードのうちの何番目の関連二次元コードであるかを示す序列番号情報と、
前記関連コード情報を備える関連二次元コードが、該関連二次元コードと序列番号が異なる他の関連二次元コードと関連付けられているか否かを示す指標情報と、を有し、
前記評価工程においては、
前記識別情報に基づいて、各々の前記二次元コードが関連二次元コードであることが確認され、前記複数の関連二次元コードの各々から取得された前記連鎖数情報及び前記序列番号情報に基づいて、前記連鎖数分の互いに異なる前記序列番号が揃ったことが確認され、前記指標情報に基づいて、互いに異なる前記序列番号を有する連鎖数分の前記関連二次元コードが関連付けられていることが確認された際に、
前記複数の関連二次元コードが互いに関連付けられていると評価することを特徴とする二次元コードの評価方法。 The two-dimensional code evaluation method according to claim 6,
The related code information is
Identification information indicating whether the two-dimensional code is a related two-dimensional code,
Chain number information indicating the number of chains of a plurality of related two-dimensional codes associated with each other,
A related two-dimensional code comprising the related code information, and a sequence number information indicating what number of the related two-dimensional code of the number of chains the related two-dimensional code,
The related two-dimensional code provided with the related code information has index information indicating whether or not the related two-dimensional code is associated with another related two-dimensional code having a different order number from the related two-dimensional code,
In the evaluation step,
Based on the identification information, each of the two-dimensional code is confirmed to be a related two-dimensional code, based on the chain number information and the sequence number information acquired from each of the plurality of related two-dimensional code , It is confirmed that the different ordering numbers corresponding to the number of chains are aligned, and it is confirmed that the related two-dimensional codes corresponding to the number of chains having different ordering numbers are associated based on the index information. When
A method for evaluating a two-dimensional code, characterized in that the plurality of related two-dimensional codes are evaluated as being associated with each other.
開示するデータを表すコード語としてコード化された開示データコードの総数が、コード語を配置すべきコード領域に収容可能な容量に満たない場合、前記コード領域に配置された前記開示データコードがなすコード列の終端を示す終端識別コードをこのコード列の最後に配置するとともに、前記コード領域の空き部分にデータを表さないパディングコードを配置し、秘匿するデータを表すコード語としてコード化された非公開データコードを前記パディングコードの一部または全部に代えて、前記終端識別コードの後に配置する二次元コードの生成工程を、複数回実行することにより、前記複数の関連二次元コードの各々を生成し、
各々の前記生成工程において前記非公開データコードを配置する際に、前記複数の関連二次元コードが互いに関連付けられていることを特定可能とするための関連コード情報を前記非公開データコードに含ませること
を特徴とする二次元コードの生成システム。 A two-dimensional code generation system for generating a plurality of related two-dimensional codes associated with each other,
When the total number of disclosure data codes encoded as code words representing the disclosed data is less than the capacity that can be accommodated in the code area in which the code word is to be arranged, the disclosure data code arranged in the code area makes An end identification code indicating the end of the code string is placed at the end of this code string, and a padding code that does not represent data is placed in the empty part of the code area, and is encoded as a code word that represents secret data. By replacing the secret data code with a part or all of the padding code and performing a step of generating a two-dimensional code that is arranged after the terminal identification code, a plurality of related two-dimensional codes are generated by executing the step of generating the two-dimensional code a plurality of times. Generate,
When arranging the non-public data code in each of the generation steps, the non-public data code includes related code information for making it possible to specify that the plurality of related two-dimensional codes are associated with each other. A two-dimensional code generation system characterized by
前記関連二次元コードから前記非公開データコードを抽出し、前記非公開データコードから前記関連コード情報を取り出す関連コード情報取り出し処理を、読み取った前記複数の関連二次元コードの各々に対して実行する取り出し手段と、
前記複数の関連二次元コードの各々から取得された前記関連コード情報に基づいて、前記複数の関連二次元コードが互いに関連付けられていることを評価する評価手段と、を備えることを特徴とする二次元コード評価システム。 A two-dimensional code evaluation system that reads a plurality of related two-dimensional codes generated by the two-dimensional code generation method according to claim 9 and evaluates that the plurality of related two-dimensional codes are associated with each other. ,
A related code information extraction process of extracting the private data code from the related two-dimensional code and extracting the related code information from the private data code is executed for each of the read plurality of related two-dimensional codes. Take-out means,
Based on the related code information acquired from each of the plurality of related two-dimensional codes, an evaluation unit that evaluates that the plurality of related two-dimensional codes are related to each other. Dimension code evaluation system.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018219939A JP2020086893A (en) | 2018-11-26 | 2018-11-26 | Two-dimensional code evaluation system and method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2018219939A JP2020086893A (en) | 2018-11-26 | 2018-11-26 | Two-dimensional code evaluation system and method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2020086893A true JP2020086893A (en) | 2020-06-04 |
Family
ID=70909941
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2018219939A Pending JP2020086893A (en) | 2018-11-26 | 2018-11-26 | Two-dimensional code evaluation system and method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2020086893A (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009009547A (en) * | 2007-05-29 | 2009-01-15 | Denso Wave Inc | Method of creating two-dimensional code and its reader |
JP2016004357A (en) * | 2014-06-16 | 2016-01-12 | 株式会社トッパンTdkレーベル | Concealment method for concealment target information, concealment target information concealment device, program, extraction method for concealment target information, and concealment target information extraction device |
JP5966053B1 (en) * | 2015-04-17 | 2016-08-10 | 株式会社トッパンTdkレーベル | Information management method and information management system |
JP6446578B1 (en) * | 2018-02-13 | 2018-12-26 | 株式会社トッパンTdkレーベル | Two-dimensional code generation method, two-dimensional code generation system, two-dimensional code evaluation method, two-dimensional code evaluation system, and two-dimensional code management system |
-
2018
- 2018-11-26 JP JP2018219939A patent/JP2020086893A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2009009547A (en) * | 2007-05-29 | 2009-01-15 | Denso Wave Inc | Method of creating two-dimensional code and its reader |
JP2016004357A (en) * | 2014-06-16 | 2016-01-12 | 株式会社トッパンTdkレーベル | Concealment method for concealment target information, concealment target information concealment device, program, extraction method for concealment target information, and concealment target information extraction device |
JP5966053B1 (en) * | 2015-04-17 | 2016-08-10 | 株式会社トッパンTdkレーベル | Information management method and information management system |
JP6446578B1 (en) * | 2018-02-13 | 2018-12-26 | 株式会社トッパンTdkレーベル | Two-dimensional code generation method, two-dimensional code generation system, two-dimensional code evaluation method, two-dimensional code evaluation system, and two-dimensional code management system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP4924468B2 (en) | Two-dimensional code generation method and reader | |
US8879737B2 (en) | Method for producing two-dimensional code and reader for reading the two-dimensional code | |
JP6450479B2 (en) | Anti-counterfeiting method | |
JP4924206B2 (en) | Two-dimensional code generation method and reader | |
JP5914579B2 (en) | Concealment target information concealment method, concealment target information concealment device, program, concealment target information extraction method, and concealment target information extraction device | |
US20210150169A1 (en) | Method and device for providing and verifying two-dimensional code | |
JP6124124B2 (en) | Authentication system | |
WO2014098128A1 (en) | Information code, information code generation method, information code reader device, and information code usage system | |
JP6020089B2 (en) | Fraud detection system | |
JP2009031969A (en) | Delivery management system | |
JP6446578B1 (en) | Two-dimensional code generation method, two-dimensional code generation system, two-dimensional code evaluation method, two-dimensional code evaluation system, and two-dimensional code management system | |
JP2020086893A (en) | Two-dimensional code evaluation system and method | |
JP5196046B2 (en) | Two-dimensional code generating program and two-dimensional code | |
EP2000950B1 (en) | Method for producing two-dimensional code and reader for reading the two-dimensional code | |
KR101570704B1 (en) | System for utilizing information code and reader reading information code | |
JP6265288B2 (en) | Information code generation method, information code, information code reader, and information code utilization system | |
TWI323858B (en) | ||
JP5724721B2 (en) | Optical information reader | |
JP5196045B2 (en) | Printer for printing two-dimensional code, display device for displaying two-dimensional code, and system | |
JP2022015837A (en) | Two-dimensional code generation method, two-dimensional code, and two-dimensional code reader | |
JP2015194811A (en) | Information code, information code reading device, and information code reading system | |
WO2010046864A1 (en) | Document verification |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20191122 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20191122 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20211005 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20220926 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20221108 |
|
A601 | Written request for extension of time |
Free format text: JAPANESE INTERMEDIATE CODE: A601 Effective date: 20230110 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20230425 |