Code generation device, code generation method, code processing device, code processing method, program, and two dimensional code medium
The code generation device encrypts and combines tangram patterns with two-dimensional codes to prevent unauthorized reproduction, ensuring code authenticity.
Patent Information
- Application Number
- JP2024127843
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2024-08-02
- Publication Date
- 2026-02-16
Smart Images

Figure 2026025206000001_ABST
Abstract
Description
[Technical Field]
[0001] The present disclosure relates to a code generation device, a code generation method, a code processing device, a code processing method, a program, and a two-dimensional code medium. [Background technology]
[0002] Two-dimensional barcodes and codes such as QR Code (QR Code is a registered trademark of Denso Wave Inc.) are widely used in product management and campaigns because information can be easily obtained using published procedures and equipment, and labels with two-dimensional barcodes printed on them can be used to embed information into objects.
[0003] For example, a technique has been proposed for generating a composite code based on such a two-dimensional code to increase the amount of information. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] Patent No. 6746158 Summary of the Invention [Problem to be solved by the invention]
[0005] These two-dimensional barcodes can be reproduced using consumer copy machines and printers in a way that makes them difficult to distinguish visually. However, to prevent the unauthorized use of the codes in copies and counterfeits, there is a need for technology that makes it difficult to produce such copies and counterfeits.
[0006] In view of the above problems, an object of the present disclosure is to provide a technology for making it difficult to copy two-dimensional codes. [Means for solving the problem]
[0007] One aspect of the present disclosure relates to a code generation device having an acquisition unit that acquires a character string to be encoded, an encryption unit that encrypts the character string, and a code generation unit that generates a two-dimensional code based on the encryption result and combines a tangram pattern code corresponding to secret information determined from the encryption result with the two-dimensional code. [Effects of the Invention]
[0008] According to the present disclosure, it is possible to provide a technique for making it difficult to copy a two-dimensional code. [Brief explanation of the drawings]
[0009] [Figure 1] FIG. 1 is a schematic diagram illustrating a two-dimensional code verification process according to an embodiment of the present disclosure. [Figure 2] FIG. 2 is a diagram illustrating a two-dimensional code medium according to an embodiment of the present disclosure. [Figure 3] FIG. 3 is a schematic diagram illustrating a tangram pattern according to one embodiment of the present disclosure. [Figure 4] FIG. 4 is a diagram illustrating a copy of a two-dimensional code medium according to one embodiment of the present disclosure. [Figure 5] FIG. 5 is a diagram illustrating a copy of a two-dimensional code medium according to one embodiment of the present disclosure. [Figure 6] FIG. 6 is a block diagram illustrating a code generating device and a code processing device according to one embodiment of the present disclosure. [Figure 7] FIG. 7 is a block diagram illustrating a hardware configuration of a code generation device and a code processing device according to an embodiment of the present disclosure. [Figure 8] FIG. 8 is a block diagram illustrating a functional configuration of a code generation device according to an embodiment of the present disclosure. [Figure 9] FIG. 9 is a schematic diagram illustrating a procedure for generating a two-dimensional code according to an embodiment of the present disclosure. [Figure 10] FIG. 10 is a flowchart illustrating a code generation process according to an embodiment of the present disclosure. [Figure 11]FIG. 11 is a block diagram illustrating a functional configuration of a code processing device according to an embodiment of the present disclosure. [Figure 12] FIG. 12 is a schematic diagram illustrating a processing procedure for a two-dimensional code according to an embodiment of the present disclosure. [Figure 13] FIG. 13 is a diagram illustrating a tangram pattern code (0) according to one embodiment of the present disclosure. [Figure 14] FIG. 14 is a diagram illustrating a tangram pattern code (1) according to one embodiment of the present disclosure. [Figure 15] FIG. 15 is a diagram illustrating a tangram pattern code (2) according to one embodiment of the present disclosure. [Figure 16] FIG. 16 is a diagram illustrating a tangram pattern code (3) according to one embodiment of the present disclosure. [Figure 17] FIG. 17 is a diagram illustrating a tangram pattern code (4) according to one embodiment of the present disclosure. [Figure 18] FIG. 18 is a diagram illustrating a tangram pattern code (5) according to one embodiment of the present disclosure. [Figure 19] FIG. 19 is a diagram illustrating a tangram pattern code (6) according to one embodiment of the present disclosure. [Figure 20] FIG. 20 is a diagram illustrating a tangram pattern code (7) according to one embodiment of the present disclosure. [Figure 21] FIG. 21 is a diagram illustrating a tangram pattern code (8) according to one embodiment of the present disclosure. [Figure 22] FIG. 22 is a diagram illustrating a tangram pattern code (9) according to one embodiment of the present disclosure. [Figure 23] FIG. 23 is a diagram showing a tangram pattern code (A) according to one embodiment of the present disclosure. [Figure 24] FIG. 24 is a diagram illustrating a tangram pattern code (B) according to one embodiment of the present disclosure. [Figure 25] FIG. 25 is a diagram illustrating a tangram pattern code (C) according to one embodiment of the present disclosure. [Figure 26]FIG. 26 is a diagram illustrating a tangram pattern code (D) according to one embodiment of the present disclosure. [Figure 27] FIG. 27 is a diagram illustrating a tangram pattern code (E) according to one embodiment of the present disclosure. [Figure 28] FIG. 28 is a diagram illustrating a tangram pattern code (F) according to one embodiment of the present disclosure. [Figure 29] FIG. 29 is a schematic diagram illustrating the determination of a tangram pattern code according to one embodiment of the present disclosure. [Figure 30] FIG. 30 is a diagram illustrating a modified example of a two-dimensional code according to an embodiment of the present disclosure. [Figure 31] FIG. 31 is a flowchart illustrating a code restoration process according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE INVENTION
[0010] Hereinafter, embodiments of the present disclosure will be described with reference to the drawings.
[0011] In the following embodiments, a two-dimensional code medium with a copy prevention function, a code generating device for generating the two-dimensional code medium, and a code processing device for processing the two-dimensional code medium are disclosed.
[0012] [Summary of the Disclosure] In the following embodiment, as shown in Fig. 1, when a user captures an image of a two-dimensional code medium 10 such as a QR code using the camera function of a user device 50 such as a smartphone, the user device 50 transmits the captured image of the two-dimensional code medium 10 to a code processing device 200. In the two-dimensional code medium 10 according to this embodiment, as shown in Fig. 2, not only is a two-dimensional code generated from the encryption result of the character string to be encoded embedded together with a linked Uniform Resource Locator (URL), but also a tangram pattern code 20 corresponding to secret information determined from the encryption result is embedded.
[0013] When the code processing device 200 is accessed by the user device 50 via a URL including the encrypted variable code embedded in the two-dimensional code medium 10, it acquires a captured image of the two-dimensional code medium from the user device 50. The code processing device 200 extracts the tangram pattern code 20 from a predetermined pattern area such as a finder pattern of the captured two-dimensional code medium 10, and acquires secret information corresponding to the extracted tangram pattern code 20. Then, the code processing device 200 combines the encrypted variable code 20 and secret information acquired when the user device 50 accessed, and restores the character string encoded in the two-dimensional code medium 10 based on the combination result.
[0014] Such a two-dimensional code medium 10 can be generated by, for example, a code generation device 100. When a character string to be encoded is acquired, the code generation device 100 encrypts the acquired character string and acquires an encrypted variable code expressed in hexadecimal (HEX) as the encryption result. Then, the code generation device 100 extracts a part (e.g., the least significant two bytes) of the acquired encrypted variable code as secret information and determines a tangram pattern code 20 corresponding to the two-byte secret information according to a predetermined conversion rule. The code generation device 100 generates a two-dimensional code based on the encrypted variable code excluding the secret information, and generates the two-dimensional code medium 10 by embedding the tangram pattern code 20 in a predetermined pattern area such as a finder pattern.
[0015] Here, a tangram pattern is known as a well-known silhouette puzzle, and is generated by dividing a square into several triangles and quadrangles, as shown in Figure 3. Specifically, each tangram pattern is composed of one or more of the following figures: two large right-angled isosceles triangles I-1 and I-2, a medium-sized right-angled isosceles triangle V, two small right-angled isosceles triangles III-1 and III-2, a square IV, and a parallelogram II.
[0016] For example, for hexadecimal numbers, 16 Tangram codes, "0" to "9" and "A" to "F," can be mapped to each hexadecimal word, as shown in Figure 3. Tangram patterns can be created by combining the shapes mentioned above, but a distinctive feature is the pattern of shapes that combine to form a square containing a blank space (i.e., the length of one side is fixed, and the area of the enclosed blank space is equal). Coding is possible using different shapes of blank spaces. In the example shown, one Tangram pattern can express 0.5 bytes of information using 16 unique blank space patterns.
[0017] If the two-dimensional code medium 10 generated in this way is printed, for example, on a typical consumer copy machine (1200 dpi, etc.), as shown in Figure 4, the tangram pattern code 20 embedded in the finder pattern may be crushed in the copy due to ink bleeding or dot overflow, and the area of the blank area may be reduced or lost.
[0018] For example, in the original tangram pattern code 20 embedded in the finder pattern as shown in FIG. 5A, the brightness of the black areas is 0-10%, while the brightness of the blank areas is 90-100%. However, when this original tangram pattern code 20 is printed, as shown in FIG. 5B, ink bleeding occurs, and the blank areas are reduced by about 50%. Furthermore, when this original tangram pattern code 20 is duplicated, the blank areas become gray (e.g., brightness 10-89%) or are crushed, as shown in FIG. 5C. In this way, the tangram pattern code 20 is difficult to reproduce by duplication using a consumer copy machine, and it may be impossible to restore the character string encoded on the two-dimensional code medium 10.
[0019] 6, when the code generating device 100 receives a character string to be encoded to be embedded in a two-dimensional code, it generates a two-dimensional code medium 10 including a tangram pattern code 20 according to a code generation process as described in detail below. On the other hand, when the code processing device 200 receives a captured image of the two-dimensional code medium 10 including the tangram pattern code 20 generated by the code generating device 100, it restores the encoded character string according to a code restoration process as described in detail below.
[0020] Here, the code generation device 100 and the code processing device 200 may have, for example, a hardware configuration as shown in Fig. 7. That is, the code generation device 100 and the code processing device 200 have an interface device 101, a storage device 102, a memory device 103, a processor 104, a user interface (UI) device 105, and a communication device 106, which are interconnected via a bus B.
[0021] Programs and / or data that realize various functions and processes in the code generation device 100 and the code processing device 200 are downloaded to the storage device 102 or memory device 103 via the interface device 101 from an external device and / or a network.
[0022] The storage device 102 is realized by a nonvolatile memory or the like, and stores installed or downloaded programs or data (for example, files, etc.).
[0023] The memory device 103 is realized by a random access memory, a static memory, or the like, and when a program or instruction is activated, reads and stores the program, instruction, data, or the like from the storage device 102. The storage device 102, the memory device 103, and the removable storage medium may be collectively referred to as a non-transitory storage medium.
[0024] The processor 104 may be realized by one or more CPUs (Central Processing Units), GPUs (Graphics Processing Units), processing circuitry, etc., which may be composed of one or more processor cores, and performs various functions and processes of the code generation device 100 and the code processing device 200 in accordance with programs, instructions, data such as parameters required to execute the programs or instructions, etc. stored in the memory device 103.
[0025] The user interface (UI) device 105 may be composed of input devices such as a keyboard, a mouse, a camera, a microphone, etc., output devices such as a display, a speaker, a headset, a printer, etc., and input / output devices such as a touch panel, and realizes an interface between the user and the code generation device 100 and the code processing device 200. For example, the user may operate the code generation device 100 and the code processing device 200 by operating a GUI (Graphical User Interface) displayed on a display or a touch panel using a keyboard, a mouse, etc.
[0026] The communication device 106 is realized by various communication circuits that execute wired and / or wireless communication processing with external devices, the Internet, a LAN (Local Area Network), a cellular network, or other communication networks.
[0027] However, the above-described hardware configuration is merely an example, and the code generation device 100 and the code processing device 200 according to the present disclosure may be realized by any other suitable hardware configuration.
[0028] [Code generator] A code generation device 100 according to an embodiment of the present disclosure will be described. The code generation device 100 processes a character string to be encoded and generates a two-dimensional code medium 10 in which the character string is encoded as a processing result. FIG. 8 is a block diagram showing a functional configuration of the code generation device 100 according to an embodiment of the present disclosure. As shown in FIG. 8, the code generation device 100 includes an acquisition unit 110, an encryption unit 120, and a code generation unit 130. For example, one or more functional units of the acquisition unit 110, the encryption unit 120, and the code generation unit 130 may be realized by one or more processors 104 executing one or more programs or instructions.
[0029] The acquiring unit 110 acquires a character string to be encoded. For example, the acquiring unit 110 acquires a character string to be encoded onto the two-dimensional code medium 10 from the user device 50 or the like, and provides the acquired character string to the encryption unit 120.
[0030] The encryption unit 120 encrypts a character string. Specifically, the encryption unit 120 encrypts the character string to be encoded acquired from the acquisition unit 110, and acquires the encryption result such as an encrypted variable code. For example, the encryption unit 120 encrypts the character string to be encoded in accordance with AES (Advanced Encryption Standard)-256-ECB (Electronic CodeBook), and acquires a HEX byte string.
[0031] 9, the encryption unit 120 acquires the character string "Genuine" to be encoded in step E1, and then encrypts the character string "Genuine" in accordance with AES-256-ECB in step E2 to acquire the encrypted variable code "234a9c438b1356316eed1cb6b222f66e" as a HEX string indicating the encryption result. Here, the decryption key for this encryption is "c0ffee."
[0032] The code generation unit 130 generates a two-dimensional code based on the encryption result and combines a tangram pattern code corresponding to secret information determined from the encryption result with the two-dimensional code. First, the code generation unit 130 extracts, as secret information, a code at a predetermined code position of the encrypted variable code, which is the encryption result of the encryption unit 120. For example, the code generation unit 130 extracts, as secret information, the least significant byte of the encrypted variable code, i.e., the least significant two digits of the HEX string. However, the code position and the number of codes of the secret information according to the present disclosure are not necessarily limited thereto, and any other appropriate code position and / or number of codes may be applied.
[0033] For example, as shown in FIG. 9, in step E3, the code generation unit 130 decomposes the encrypted variable code “234a9c438b1356316eed1cb6b222f66e” into secret information of the least significant two digits “6e” and the encrypted variable code excluding the secret information “234a9c438b1356316eed1cb6b222f6.”
[0034] Then, the code generation unit 130 encodes the encrypted variable code from which the confidential information has been removed, and generates a two-dimensional code based on the encoding result of the encrypted variable code. For example, the encoding may be performed according to, but is not limited to, BASE64.
[0035] 9, in step E4, the code generation unit 130 encodes the encrypted variable code “234a9c438b1356316eed1cb6b222f6” excluding the confidential information according to BASE64 to obtain the encrypted variable code “I0qcQ4sTVjFu7Ry2siL2.” Then, in step E5, the code generation unit 130 generates the URL “https: / / example.com?cd=I0qcQ4sTVjFu7Ry2siL2” including the encoded encrypted variable code “I0qcQ4sTVjFu7Ry2siL2.”
[0036] In step E6, the code generation unit 130 encodes the generated URL "https: / / example.com?cd=I0qcQ4sTVjFu7Ry2siL2" to generate a QR code in which the URL is encoded according to a known QR code creation method, and identifies the tangram pattern code 20 corresponding to the secret information "6e." For example, based on the predetermined correspondence between each hexadecimal number and the tangram pattern code 20 as shown in FIG. 3, the code generation unit 130 identifies two tangram pattern codes 20 corresponding to the hexadecimal numbers "6" and "e."
[0037] The code generation unit 130 places the tangram pattern code 20 in a predetermined pattern area of the two-dimensional code. Specifically, in step E7, the code generation unit 130 places two tangram pattern codes 20 corresponding to the secret information "6" and "e" in the finder pattern of the generated QR code. Note that the pattern area according to the present disclosure is not necessarily limited to the finder pattern, and the tangram pattern code 20 may be embedded in any other area on the two-dimensional code medium 10.
[0038] The code generation device 100 described above can generate a two-dimensional code medium 10 that is difficult to reproduce using a consumer printer or the like.
[0039] [Code generation process] Next, a code generation process according to an embodiment of the present disclosure will be described. The code generation process can be realized by the code generation device 100, more specifically, by the processor 104 of the code generation device 100 executing a program stored in the memory device 103. Fig. 10 is a flowchart showing the code generation process according to an embodiment of the present disclosure.
[0040] 10, in step S101, the code generating device 100 acquires a character string to be encoded. For example, the character string may be a character string included in a URL character string embedded in the two-dimensional code medium 10.
[0041] In step S102, the code generation device 100 encrypts a character string. Specifically, the code generation device 100 encrypts the character string to be encoded acquired in step S101. For example, the code generation device 100 may encrypt the character string to be encoded using any known encryption method such as AES-256-ECB, and acquire an encrypted variable code such as a HEX byte sequence as the encryption result.
[0042] In step S103, the code generation device 100 generates a two-dimensional code based on the encryption result and determines secret information. Specifically, the code generation device 100 extracts a code at a predetermined code position (e.g., the least significant two digits) of the encrypted variable code acquired in step S102 as secret information, and generates a two-dimensional code based on the encrypted variable code from which the secret information has been removed. For example, the two-dimensional code may be a QR code generated based on the encrypted variable code in accordance with a known QR code generation method.
[0043] In step S104, the code generation device 100 combines the tangram pattern code 20 corresponding to the secret information into a two-dimensional code. Specifically, the code generation device 100 identifies the tangram pattern code 20 corresponding to each digit of the secret information extracted in step S103, and embeds the identified tangram pattern code 20 in the finder pattern of the QR code.
[0044] According to the code generation process described above, it is possible to generate a two-dimensional code medium 10 that is difficult to reproduce using a consumer printer or the like.
[0045] [Code processing device] Next, a code processing device 200 according to an embodiment of the present disclosure will be described. The code processing device 200 processes a two-dimensional code printed on a two-dimensional code medium 10 and extracts an encoded character string as a processing result from the two-dimensional code. FIG. 11 is a block diagram showing a functional configuration of the code processing device 200 according to an embodiment of the present disclosure. As shown in FIG. 11, the code processing device 200 includes an acquisition unit 210, a secret information determination unit 220, and a restoration unit 230. For example, one or more functional units of the acquisition unit 210, the secret information determination unit 220, and the restoration unit 230 may be realized by one or more processors 104 executing one or more programs or instructions.
[0046] The acquiring unit 210 acquires an image of the two-dimensional code generated based on the encryption result of the character string to be encoded. For example, the two-dimensional code medium 10 acquired by the acquiring unit 210 is generated from the result of combining the secret information and the encrypted variable code generated by the code generating device 100 described above.
[0047] For example, the acquiring unit 210 may acquire the encrypted variable code when the user device 50, which has captured the image of the two-dimensional code medium 10, accesses a link destination encoded in the two-dimensional code. Specifically, as shown in Fig. 12, in step D1, the acquiring unit 210 acquires an image of a QR code in which the tangram pattern code 20 is embedded in the finder pattern and the encoded encrypted variable code is embedded. Furthermore, in step D2, when the user device 50 accesses via the URL "https: / / example.com?cd=I0qcQ4sTVjFu7Ry2siL2", the acquiring unit 210 extracts the encoded encrypted variable code "I0qcQ4sTVjFu7Ry2siL2" from the URL.
[0048] The secret information determination unit 220 extracts the tangram pattern code 20 generated as a result of encryption from the image, and determines secret information corresponding to the tangram pattern code 20. Specifically, the secret information determination unit 220 extracts the tangram pattern code 20 from a predetermined pattern area of the two-dimensional code. In the example shown in Fig. 12, in step D3, the secret information determination unit 220 detects two tangram pattern codes 20 from the finder pattern of the QR code, and identifies the secret information "6e" corresponding to these tangram pattern codes 20.
[0049] The restoration unit 230 generates a further encrypted variable code as a result of combining the encrypted variable code decrypted from the two-dimensional code and the secret information, and restores the character string by decrypting the generated further encrypted variable code. Specifically, the restoration unit 230 decrypts the encrypted variable code encoded from the URL accessed by the user device 50, and generates a HEX byte string of the encrypted variable code from which the secret information has been removed.
[0050] For example, as shown in FIG. 12, in step D4, the restoration unit 230 decodes the coded encrypted variable code "I0qcQ4sTVjFu7Ry2siL2" to obtain the HEX byte sequence "234a9c438b1356316eed1cb6b222f6" of the encrypted variable code from which the confidential information has been removed.
[0051] The restoration unit 230 combines the decrypted encrypted variable code from which the secret information has been removed with the secret information to obtain the combined result. Specifically, the restoration unit 230 may concatenate the secret information at a predetermined code position of the decryption result of the encrypted variable code from which the secret information has been removed, to generate an encrypted variable code including the secret information.
[0052] For example, in the example shown in Figure 12, in step D5, the restoration unit 230 concatenates the secret information "6e" to the end of the HEX byte sequence "234a9c438b1356316eed1cb6b222f6" of the encrypted variable code from which the secret information has been removed, thereby obtaining the HEX byte sequence "234a9c438b1356316eed1cb6b222f66e" of the encrypted variable code including the secret information.
[0053] Then, the restoration unit 230 decrypts the encrypted variable code including the secret information using a decryption key corresponding to the encryption key used to encrypt the character string. In the example shown in Fig. 12, in step D6, the restoration unit 230 decrypts the HEX byte sequence "234a9c438b1356316eed1cb6b222f66e" of the encrypted variable code including the secret information using the decryption key "c0ffee", and obtains the character string "Genuine" encoded in the captured QR code as the decryption result.
[0054] The code processing device 200 described above can restore character strings encoded in the two-dimensional code medium 10, including the tangram pattern code 20, which is difficult to reproduce using a consumer printer or the like.
[0055] The tangram pattern codes "0" to "9" and "A" to "F" each have a combination of tangram patterns shown in FIGS. 13 to 28 and a blank space.
[0056] For example, the tangram pattern code "0" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 13. In the tangram pattern code "0" shown in the figure, the blank areas are eight areas d-1, b-2, c-2, d-2, b-3, c-3, d-3, and d-4 out of the 16 areas obtained by dividing the square.
[0057] For example, the tangram pattern code "1" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 14. In the tangram pattern code "1" shown in the figure, the blank areas are six areas c-1, d-1, b-2, c-2, b-3, and c-3 out of the 16 areas obtained by dividing the square.
[0058] For example, the tangram pattern code "2" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 15. In the tangram pattern code "2" shown in the figure, the blank areas are five areas a-2, a-3, b-3, b-4, and c-4 out of the 16 areas obtained by dividing the square.
[0059] For example, the tangram pattern code "3" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 16. In the tangram pattern code "3" shown in the figure, the blank areas are five areas b-2, c-2, c-3, d-3, and d-4 out of the 16 areas obtained by dividing the square.
[0060] For example, the tangram pattern code "4" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 17. In the tangram pattern code "4" shown in the figure, the blank areas are the four areas b-2, c-2, a-3, and b-3 out of the 16 areas obtained by dividing the square.
[0061] For example, the tangram pattern code "5" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 18. In the tangram pattern code "5" shown in the figure, the blank areas are five areas b-1, b-2, b-3, c-3, and d-3 out of the 16 areas obtained by dividing the square.
[0062] For example, the tangram pattern code "6" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 19. In the tangram pattern code "6" shown in the figure, the blank areas are three areas b-1, b-2, and b-3 out of the 16 areas obtained by dividing the square.
[0063] For example, the tangram pattern code "7" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 20. In the tangram pattern code "7" shown in the figure, the blank areas are six areas c-1, d-1, d-2, a-3, a-4, and b-4 out of the 16 areas obtained by dividing the square.
[0064] For example, the tangram pattern code "8" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 21. In the tangram pattern code "8" shown in the figure, the blank areas are six areas d-1, b-2, c-2, d-2, b-3, and d-4 out of the 16 areas obtained by dividing the square.
[0065] For example, the tangram pattern code "9" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 22. In the tangram pattern code "9" shown in the figure, the blank areas are seven areas b-1, c-1, b-2, c-2, d-2, c-3, and d-3 out of the 16 areas obtained by dividing the square.
[0066] For example, the tangram pattern code "A" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 23. In the tangram pattern code "A" shown in the figure, the blank areas are five areas b-2, c-2, d-2, c-3, and d-3 out of the 16 areas obtained by dividing the square.
[0067] For example, the tangram pattern code "B" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 24. In the tangram pattern code "B" shown in the figure, the blank areas are six areas a-1, b-1, b-2, b-3, a-4, and b-4 out of the 16 areas obtained by dividing the square.
[0068] For example, the tangram pattern code "C" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 25. In the tangram pattern code "C" shown in the figure, the blank areas are seven areas a-2, b-2, a-3, b-3, c-3, b-4, and c-4 out of the 16 areas obtained by dividing the square.
[0069] For example, tangram pattern code "D" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 26. In the tangram pattern code "D" shown in the figure, the blank areas are seven areas c-2, d-2, b-3, c-3, d-3, a-4, and b-4 out of the 16 areas obtained by dividing the square.
[0070] For example, the tangram pattern code "E" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 27. In the tangram pattern code "E" shown in the figure, the blank areas are seven areas c-2, d-2, b-3, c-3, d-3, b-4, and c-4 out of the 16 areas obtained by dividing the square.
[0071] For example, the tangram pattern code "F" consists of a combination of tangram patterns arranged inside a square and blank areas as shown in Figure 28. In the tangram pattern code "F" shown in the figure, the blank areas are six areas c-1, d-1, d-2, d-3, c-4, and d-4 out of the 16 areas obtained by dividing the square.
[0072] Please note that according to the illustrated tangram pattern codes "0" to "9" and "A" to "F", the area of the tangram pattern combinations, i.e., the area of the areas other than the blank parts, are the same, and the area of the blank parts is also the same.
[0073] For example, the secret information determination unit 220 can identify areas where 10% or more of the blank areas are present among the 16 areas obtained by dividing each finder pattern of the QR code, and identify the tangram pattern code 20 based on the identified blank areas from a table of each tangram pattern code "0" to "9" and "A" to "F" as shown in Figure 29.
[0074] The tangram pattern code 20 superimposed on the finder pattern may include multiple digits of secret information. As shown in Fig. 30, each digit of the secret information may be adjacent to another digit, and the adjacent two-digit secret information may be enlarged twice vertically, and the enlarged two-digit secret information may be embedded in each finder pattern.
[0075] [Code restoration process] Next, a code restoration process according to an embodiment of the present disclosure will be described. The code restoration process can be realized by the code processing device 200, more specifically, by the processor 104 of the code processing device 200 executing a program stored in the memory device 103. Fig. 31 is a flowchart showing the code restoration process according to an embodiment of the present disclosure.
[0076] 31, in step S201, the code processing device 200 acquires an image of a two-dimensional code. Here, the two-dimensional code may be generated based on the result of encryption of a character string to be encoded. Typically, the code processing device 200 acquires a URL character string for accessing the code processing device 200, which is encoded into a QR code, and extracts an encrypted variable code from the URL character string.
[0077] For example, when the code processing device 200 is realized as a server communicatively connected to the user device 50, when a user captures an image of a two-dimensional code medium 10 such as a QR code using the camera function of the user device 50 such as a smartphone, the code processing device 200 may acquire the captured image of the two-dimensional code medium 10 from the user device 50. Alternatively, when the code processing device 200 is realized by an app installed in the user device 50 that executes the two-dimensional code restoration process, when a user captures an image of a two-dimensional code medium 10 such as a QR code using the camera function of the user device 50 such as a smartphone, the app may acquire the captured image of the captured two-dimensional code medium 10.
[0078] In step S202, the code processing device 200 extracts the tangram pattern code 20 generated from the encryption result from the image, and determines secret information corresponding to the tangram pattern code 20. Specifically, the code processing device 200 extracts the tangram pattern code 20 from the captured image of the two-dimensional code medium 10 acquired in step S201. For example, the tangram pattern code 20 is extracted from the finder pattern of a QR code, and the code processing device 200 acquires secret information corresponding to the extracted tangram pattern code 20.
[0079] For example, the code processing device 200 may identify blank areas in an image of the tangram pattern code 20 extracted from the finder pattern, and determine the tangram pattern code 20 captured in the image based on the arrangement of the identified blank areas. The blank areas of each tangram pattern code 20 are uniquely arranged, and the tangram pattern code 20 can be identified based on the determined arrangement of the blank areas.
[0080] In step S203, the code processing device 200 combines the encrypted variable code decrypted from the two-dimensional code with the secret information. Specifically, the code processing device 200 decrypts the encrypted variable code acquired in step S201 to acquire the encrypted variable code from which the secret information has been removed. Thereafter, the code processing device 200 combines the secret information acquired in step S202 with the decrypted encrypted variable code from which the secret information has been removed, and acquires an encrypted variable code including the secret information as the combination result.
[0081] For example, the code processing device 200 concatenates the secret information to a predetermined code position (e.g., the end) of the encrypted variable code from which the decrypted secret information has been removed, and obtains an encrypted variable code containing the secret information as a combined result.
[0082] In step S204, the code processing device 200 decrypts the encrypted variable code including the secret information to restore the character string encoded in the two-dimensional code medium 10. Specifically, the code processing device 200 decrypts the encrypted variable code including the secret information acquired in step S203 using a decryption key corresponding to the encryption key used for encryption by the code generation device 100, and acquires the character string encoded in the QR code.
[0083] According to the code restoration process described above, it is possible to restore a character string encoded in the two-dimensional code medium 10, including the tangram pattern code 20, which is difficult to reproduce using a consumer printer or the like.
[0084] Although the examples of the present disclosure have been described in detail above, the present disclosure is not limited to the specific embodiments described above, and various modifications and variations are possible within the scope of the gist of the present disclosure as set forth in the claims. [Explanation of symbols]
[0085] 50 User Device 100 Code Generator 110 Acquisition Department 120 Encryption section 130 Code Generation Unit 200 Code processing device 210 Acquisition Department 220 Confidential Information Determination Division 230 Restoration Department
Claims
1. an acquisition unit that acquires a character string to be encoded; an encryption unit that encrypts the character string; a code generating unit that generates a two-dimensional code based on the encryption result and combines a tangram pattern code corresponding to secret information determined from the encryption result with the two-dimensional code; A code generating device comprising:
2. the encryption unit generates a first encrypted variable code as a result of the encryption; The code generating device according to claim 1 , wherein the code generating unit extracts a code at a predetermined code position of the first encrypted variable code as the secret information.
3. The code generating device according to claim 1 , wherein the code generating unit encodes the second encrypted variable code from which the secret information has been removed, and generates the two-dimensional code based on the encoding result of the second encrypted variable code.
4. The code generating device according to claim 1 , wherein the code generating unit arranges the tangram pattern code in a predetermined pattern area of the two-dimensional code.
5. Obtaining a string to be encoded; encrypting said string; generating a two-dimensional code based on the encryption result, and combining a tangram pattern code corresponding to secret information determined from the encryption result with the two-dimensional code; A code generation method, the method being executed by one or more computers.
6. Obtaining a string to be encoded; encrypting said string; generating a two-dimensional code based on the encryption result, and combining a tangram pattern code corresponding to secret information determined from the encryption result with the two-dimensional code; A code generation program that causes one or more computers to execute the above.
7. a two-dimensional code generated from the encryption result of the character string to be encoded; a tangram pattern code corresponding to the secret information determined from the encryption result; A two-dimensional code medium having:
8. an acquisition unit that acquires an image of a two-dimensional code generated based on the encryption result of the character string to be encoded; a secret information determination unit that extracts a tangram pattern code generated from the encryption result from the image and determines secret information corresponding to the tangram pattern code; a restoration unit that generates a second encrypted variable code as a result of combining the first encrypted variable code decrypted from the two-dimensional code and the secret information, and restores the character string by decrypting the second encrypted variable code; A code processing device comprising:
9. The code processing device according to claim 8 , wherein the restoration unit decrypts the second encrypted variable code using a decryption key corresponding to an encryption key used to encrypt the character string.
10. The code processing device according to claim 8 , wherein the acquisition unit acquires the first encrypted variable code when a user device that has captured the two-dimensional code accesses a link destination encoded in the two-dimensional code.
11. The code processing device according to claim 8 , wherein the secret information determination unit extracts the tangram pattern code from a predetermined pattern area of the two-dimensional code.
12. 9. The code processing device according to claim 8, wherein the restoration section concatenates the secret information at a predetermined code position of the decryption result of the first encrypted variable code to generate the second encrypted variable code.
13. acquiring an image of a two-dimensional code generated based on the encryption result of the character string to be encoded; extracting a tangram pattern code generated from the encryption result from the image and determining secret information corresponding to the tangram pattern code; generating a second encrypted variable code as a result of combining the first encrypted variable code decrypted from the two-dimensional code and the secret information, and restoring the character string by decrypting the second encrypted variable code; A code processing method executed by one or more computers.
14. acquiring an image of a two-dimensional code generated based on the encryption result of the character string to be encoded; extracting a tangram pattern code generated from the encryption result from the image and determining secret information corresponding to the tangram pattern code; generating a second encrypted variable code as a result of combining the first encrypted variable code decrypted from the two-dimensional code and the secret information, and restoring the character string by decrypting the second encrypted variable code; A code processing program that causes one or more computers to execute the following:
Citation Information
Patent Citations
2D code
JP6746158B2