[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN106529637B - A kind of the anti-copy implementation method and realization system of two dimensional code - Google Patents

A kind of the anti-copy implementation method and realization system of two dimensional code Download PDF

Info

Publication number
CN106529637B
CN106529637B CN201610956300.6A CN201610956300A CN106529637B CN 106529637 B CN106529637 B CN 106529637B CN 201610956300 A CN201610956300 A CN 201610956300A CN 106529637 B CN106529637 B CN 106529637B
Authority
CN
China
Prior art keywords
dimensional code
image
halftoning
dot matrix
module
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.)
Active
Application number
CN201610956300.6A
Other languages
Chinese (zh)
Other versions
CN106529637A (en
Inventor
陈昌盛
谢宁
黄继武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen University
Original Assignee
Shenzhen University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen University filed Critical Shenzhen University
Priority to CN201610956300.6A priority Critical patent/CN106529637B/en
Priority to PCT/CN2016/105867 priority patent/WO2018076409A1/en
Publication of CN106529637A publication Critical patent/CN106529637A/en
Application granted granted Critical
Publication of CN106529637B publication Critical patent/CN106529637B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06037Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking multi-dimensional coding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)
  • Facsimile Image Signal Circuits (AREA)

Abstract

The invention discloses a kind of anti-copy implementation method of two dimensional code and realize system, method includes: to obtain the input information of user, converts input information to after gray value of image and increase view finding image and obtain two dimensional code;When obtaining the two dimensional code through shooting, then image recovery, demodulation and decoding are successively carried out, encoded information is obtained;Spectrum analysis is carried out according to the two dimensional code after progress image recovery, and judges whether the extreme point that spectrum analysis obtains meets expected distribution, then prompts the two dimensional code to carry out duplication when not meeting expected distribution and operates.The communication channel model and physical equipment feature of present invention combination two dimensional code, by analyzing picture signal resampling spectrum signature, on the basis of guaranteeing that low resolution dollying equipment reads robustness to two dimensional code, the method for proposing the aliased features and strong correlation noise characteristic using picture signal is obtained to the effective evidence obtaining of two-dimensional code scanning-printing attack.

Description

A kind of the anti-copy implementation method and realization system of two dimensional code
Technical field
The present invention relates to field of information security technology more particularly to the anti-copy implementation methods and reality of a kind of two dimensional code Existing system.
Background technique
It is currently, there are using special printed material or technique, controls the generation and duplication of two dimensional code.By printing The special printed material of journey, such as holographic (holographic) material can with the polymerized liquid crystal material with distinct optical feature It is used to print two dimensional code to prevent it to be replicated.Special marking ink can also be applied in the printing of two dimensional code, example If fluoresent printing ink keeps printed two dimensional code invisible under visible light, to prevent it to be replicated.Special production technology Also it can be used for reinforcing the safety of two dimensional code, such as special halftoning printing technique produces two dimension hiding under visible light Code.
In the prior art there is also Encryption Algorithm and security protocol is used, the generation and reading of two dimensional code are controlled.It is asymmetric The Encryption Algorithm (for example, RSA Algorithm) and PKI public key encryption system of key can be used for controlling two dimensional code and generate and verify its information The true and false, such system with encipherment protection is also applied to the building of anti-counterfeiting platform.Chaos equation (Chaotic Equation it can be used for the generating process of two dimensional code identification number) to guarantee its uniqueness and random string can not be criticized Amount duplication, thus the generation of final effectively control two dimensional code.Similarly, ECDSA digital signature is applied in AuthPaper system Algorithm, to prevent document adulterator from distorting to wherein content.Other than Encryption Algorithm, researcher also proposed some be based on The security protocol of communication construction enhances the safety of shown two dimensional code.It is set for example, researcher is based on the preposition camera shooting of mobile device The standby duplex communication system with display screen proposes a kind of communication protocol for being known as " all or nothing ".Only work as reception Person can obtain simultaneously transmission and when received signal, the information of two dimensional code in channel could be decoded, and then enhance The confidentiality of information.
In the prior art there is also digital watermark technology is used, the generation of two dimensional code is controlled.Digital watermark technology can will be with The relevant information of two dimensional code is embedded in image in 2 D code.For example, directly decomposing the picture frequency of two dimensional code using DCT and DFT Information can be embedded in the middle the not noticeable watermark information of naked eyes.After shooting image in 2 D code, it can be decoded and same When assess digital watermark information authenticity.Similarly, digital watermarking can also be stored in the domain DWT.However, a kind of guarantee watermark The more robust method of information is the information redundance using two dimensional code, modifies the overall brightness of part of module to store in two dimensional code The digital signature of appearance.Comprehensively consider the robust degree and capacity of institute's watermark information, then using in two dimensional code decoding process to every The distortion toleance degree of a module, the pattern of modified module is to store watermark information.
In the prior art there is also patterns or physical unclonable feature with copy detection feature are used, control The generation and duplication of two dimensional code.The considerations of for decoding stability, conventional two-dimensional code is by sufficiently large black and white block elements group At.However, this design is easy to be copied.Some designs that can be used for two dimensional code with more details characteristic pattern pattern In, to resist most direct scanning-print form duplication.It is used to copy by the figure that highdensity black and white unit forms figure Detection, and key model of the logarithm normal distribution as print and scan channel is used in detection process.In addition to black and white binary map Picture, gray level image may be alternatively used in copy detection pattern.Wherein, the decision of copy detection can be based on gray level image in printing- The variation characteristic in channel is scanned, main includes the high-frequency characteristic of image, such as sharpness.Compared with gray level image, multicolour pattern Contain the information in tetra- channels CMYK.After copy, feature (the color mean value in module, variance, the entropy of color therein Deng) apparent difference can be generated.Other than above-mentioned minutiae patterns feature, printing document in physics unclonable function also by Apply to the bootlegging of identification air exercise printed text shelves.Physics unclonable function (Physical Unclonable therein Function, PUF) it is to change at random as caused by printing device and paper, feature is easy to extract and analyzes but do not allow Easily it is replicated forgery.For example, the random variation of printing carbon dust and paper, the microscopic roughness of paper.
Above-mentioned a few class methods, can enhance two-dimension code safe to some extent, but also bring some problems:
1) advantage of the two dimensional code in versatility is reduced.Two dimensional code is made with special printed material or technique, can be reinforced The bootlegging to two dimensional code is resisted to the control of generating process, but inevitably reduces the versatility of two dimensional code (increasing the production cost of two dimensional code and the dependence to special installation).With similar technique (e.g., RFID and intelligent sensing Device) it compares, the main advantage of two dimensional code is its extremely low cost and the flexibility independent of special hardware.Therefore, this Class will greatly reduce the competition of two dimensional code large-scale application in Internet of Things based on the method for special printed material or technique Power.
2) increase and use complexity.Compared with conventional two-dimensional code, introduce based on encryption and digital watermarking scheduling algorithm or safety The scheme of agreement can control the unwarranted generation of two dimensional code and illegally distorting to data in the middle, but increase system Complexity.For encrypting with watermarking algorithm, in terms of complexity is mainly reflected in following two: firstly, asymmetric utilizing During Encryption Algorithm and digital signature technology carry out generation control to two dimensional code, need to arrange Public Key Infrastructure (Public Key Infrastructure, PKI).It must guarantee the safety of each private key for user, and the communication canal for passing through safety Distribute corresponding public key in road.Secondly, adding additional the decryption or information extraction step to two dimensional code during information use Suddenly.
3) it can not effectively solve to resist the contradiction of bootlegging and general applicability.Most of all, even if two dimensional code is answered With copy detection pattern and physics unclonable function or above-mentioned safety (encryption and digital watermarking) algorithm, it is also difficult to Prevent adulterator from replicating the two dimensional code under the system framework of Internet of Things.It is special based on the extracted image of physics unclonable function Sign is related to printing out the details in image.In order to accurately grab this category feature, need to have to the verification environment of two dimensional code certain Limitation, this does not meet the general applicability purport of Internet of Things.For example, the document verified is placed in relatively-stationary distance and light According in environment.On the other hand, due to above-mentioned security algorithm only ensure that in terms of information encryption information in two dimensional code can By property, the visuality of information in two dimensional code can not be changed, therefore be also difficult to be effective against bootlegging.Further, since copy inspection Mapping case is typically based on the decaying of high-frequency information to judge the true and false of the image, and copying equipment used in attacker is (high-precision Spend scanner, duplicator etc.) often there is higher resolution ratio and more complete to the reservation of high-frequency information.Accordingly, it is difficult to protecting Prevent adulterator from replicating to it under the premise of results card Device-General type.
As it can be seen that in recent years it has been realized that two dimensional code problem in terms of generating and replicating control, and proposes one A little solutions, and effective control is brought to control aspect is generated.However these methods guarantee two dimensional code uniqueness, The general performance in terms of bootlegging is resisted still to need to be further increased.
Therefore, the existing technology needs to be improved and developed.
Summary of the invention
In view of above-mentioned deficiencies of the prior art, the purpose of the present invention is to provide a kind of anti-copy implementation methods of two dimensional code And realize system, it is intended to which while solving to enhance two-dimension code safe in the prior art, bring versatility is low, increases using multiple Miscellaneous degree, and can not effectively solve to resist the contradictory defect of bootlegging and general applicability.
Technical scheme is as follows:
A kind of anti-copy implementation method of two dimensional code, wherein the described method comprises the following steps:
A, the input information of user is obtained, converts input information to after gray value of image and increase view finding image and obtain two Tie up code;
B, when obtaining the two dimensional code through shooting, then image recovery, demodulation and decoding are successively carried out, obtains coding letter Breath;
C, spectrum analysis is carried out according to the two dimensional code after progress image recovery, and the extreme point for judging that spectrum analysis obtains is It is no to meet expected distribution, then prompt the two dimensional code to carry out duplication operation when not meeting expected distribution.
The anti-copy implementation method of the two dimensional code, wherein the step A is specifically included:
A1, the input information for obtaining user, convert bit stream for user information by information source and channel coding;
A2, bit stream is modulated, is converted into gray value of image, then convert corresponding halftoning for gray value of image Dot matrix;
A3, view finding pattern is added by the two dimensional code module of halftoning dot matrix composition, generate two dimensional code.
The anti-copy implementation method of the two dimensional code, wherein the spectrum structure of the halftoning dot matrix are as follows:
Wherein, p is the two-dimensional coordinate of frequency spectrum,GIt (p) is the frequency spectrum of halftoning dot matrix,G wIt (p) is the halftoning of white point black matrix The frequency spectrum of dot matrix,G b(p) frequency spectrum of the halftoning dot matrix of difference stain white background,C wIndicate entire mould shared by white halftoning dot matrix The area of block,C bIndicate the area of entire module shared by black halftone dot matrix, a1And a2For the imaging sensor picture of capture apparatus The grid vector that element is constituted, b1And b2The grid vector being made of the halftoning dot matrix in two dimensional code generating process.α 1α 2 Withβ 1β 2It can be by a1、a2With b1、b2The normalized vector obtained after normalization.
The anti-copy implementation method of the two dimensional code, wherein the step B is specifically included:
B1, when having read the two dimensional code by dollying equipment, then obtain image in 2 D code, and to two dimensional code figure As carrying out image recovery, shape distortion of the image in 2 D code in communication channel, the two dimensional code after being restored are restored;
B2, according to the two dimensional code after reduction, extract two dimensional code module, each two dimensional code module carried out corresponding with modulation Demodulation, obtain bit stream;
B3, bit stream is carried out to information source and channel decoding, obtains encoded information.
The anti-copy implementation method of the two dimensional code, wherein the step C is specifically included:
C1, according to carry out image recovery after two dimensional code, extract two dimensional code module;
C2, spectrum analysis is carried out to the two dimensional code module, obtains signal period property feature;
C3, judge whether the distance between the extreme point in spectrum analysis and the extreme point of calculating meet expected distribution, when The two dimensional code is then prompted to carry out duplication operation when not meeting expected distribution.
A kind of anti-copy realization system of two dimensional code, wherein include:
Two-dimensional code generation module converts input information to after gray value of image simultaneously for obtaining the input information of user Increase view finding image and obtains two dimensional code;
Two dimensional code decoder module, for when through shooting obtain the two dimensional code when, then successively carry out image recovery, demodulation and Decoding, obtains encoded information;
Two dimensional code authentication module for carrying out spectrum analysis according to the two dimensional code after progress image recovery, and judges frequency spectrum It analyzes whether obtained extreme point meets expected distribution, the two dimensional code is then prompted to carry out duplication behaviour when not meeting expected distribution Make.
System is realized in the anti-copy of the two dimensional code, wherein the two-dimensional code generation module specifically includes:
Information source and channel encoding unit are believed user by information source and channel coding for obtaining the input information of user Breath is converted into bit stream;
Modulation unit is converted into gray value of image for bit stream to be modulated, then converts gray value of image to pair The halftoning dot matrix answered;
Image adding unit generates two dimension for adding view finding pattern by the two dimensional code module that halftoning dot matrix forms Code.
System is realized in the anti-copy of the two dimensional code, wherein the spectrum structure of the halftoning dot matrix are as follows:
Wherein, p is the two-dimensional coordinate of frequency spectrum,GIt (p) is the frequency spectrum of halftoning dot matrix,G wIt (p) is the halftoning of white point black matrix The frequency spectrum of dot matrix,G b(p) frequency spectrum of the halftoning dot matrix of difference stain white background,C wIndicate entire mould shared by white halftoning dot matrix The area of block,C bIndicate the area of entire module shared by black halftone dot matrix, a1And a2For the imaging sensor picture of capture apparatus The grid vector that element is constituted, b1And b2The grid vector being made of the halftoning dot matrix in two dimensional code generating process.α 1α 2 Withβ 1β 2It can be by a1、a2With b1、b2The normalized vector obtained after normalization.
System is realized in the anti-copy of the two dimensional code, wherein the two dimensional code decoder module specifically includes:
Image restoration unit, for when having read the two dimensional code by dollying equipment, then obtaining two dimensional code figure Picture, and image recovery is carried out to image in 2 D code, shape distortion of the image in 2 D code in communication channel is restored, after obtaining reduction Two dimensional code;
Demodulating unit, for extracting two dimensional code module according to the two dimensional code after reduction, to each two dimensional code module carry out with Corresponding demodulation is modulated, bit stream is obtained;
Information source and channel decoding unit obtain encoded information for bit stream to be carried out information source and channel decoding.
System is realized in the anti-copy of the two dimensional code, wherein the two dimensional code authentication module specifically includes:
Module extraction unit, for extracting two dimensional code module according to the two dimensional code after progress image recovery;
Spectral analysis unit obtains signal period property feature for carrying out spectrum analysis to the two dimensional code module;
Judging unit, for judging it is pre- whether the distance between the extreme point in spectrum analysis and the extreme point of calculating meet Phase distribution then prompts the two dimensional code to carry out duplication operation when not meeting expected distribution.
The anti-copy implementation method and realization system of two dimensional code provided by the present invention, method includes: the defeated of acquisition user Enter information, converts input information to after gray value of image and increase view finding image and obtain two dimensional code;Described in being obtained through shooting When two dimensional code, then image recovery, demodulation and decoding are successively carried out, encoded information is obtained;According to the two dimension after progress image recovery Code carries out spectrum analysis, and judges whether the extreme point that spectrum analysis obtains meets expected distribution, when not meeting expected distribution The two dimensional code is then prompted to carry out duplication operation.The present invention combines the communication channel model of the two dimensional code in scanning-print procedure Low resolution is being guaranteed by the picture signal resampling spectrum signature in analysis scanning-printing with physical equipment feature On the basis of dollying equipment reads robustness to two dimensional code, proposition is made an uproar using the aliased features and strong correlation of picture signal The method of acoustic signature is obtained to the effective evidence obtaining of two-dimensional code scanning-printing attack.
Detailed description of the invention
Fig. 1 is the flow chart of the anti-copy implementation method preferred embodiment of two dimensional code of the present invention.
Fig. 2 is the signal of the two dimensional code in the anti-copy implementation method of two dimensional code of the present invention including halftoning dot matrix Figure.
Fig. 3 a is schematic diagram of the two dimensional code Jing Guo primary printing-shooting.
Fig. 3 b is that two dimensional code passes through a print and scan-printing-shooting schematic diagram.
Fig. 4 a is the spectrogram of the two dimensional code Jing Guo primary printing-shooting.
Fig. 4 b is by a print and scan-printing-shooting two dimensional code spectrogram.
Fig. 5 is the spectrum structure schematic diagram of halftoning dot matrix.
Fig. 6 is that the functional block diagram of system preferred embodiment is realized in the anti-copy of two dimensional code of the present invention.
Specific embodiment
The present invention provides the anti-copy implementation method and realization system of a kind of two dimensional code, to make the purpose of the present invention, technology Scheme and effect are clearer, clear, and the present invention is described in more detail below.It should be appreciated that described herein specific Embodiment is only used to explain the present invention, is not intended to limit the present invention.
As shown in Figure 1, the flow chart of the anti-copy implementation method preferred embodiment for two dimensional code of the present invention, the side Method the following steps are included:
Step S100, the input information for obtaining user converts input information to after gray value of image and increases view finding figure As obtaining two dimensional code;
Step S200, when obtaining the two dimensional code through shooting, then image recovery, demodulation and decoding is successively carried out, is obtained Encoded information;
Step S300, spectrum analysis is carried out according to the two dimensional code after progress image recovery, and judges what spectrum analysis obtained Whether extreme point meets expected distribution, and the two dimensional code is then prompted to carry out duplication operation when not meeting expected distribution.
In the embodiment of the present invention, the input information of user includes character string, network address etc., in the input letter for obtaining user After breath, gray value of image is converted by input information, and convert corresponding halftoning dot matrix for gray value of image, and increase and seek As image obtains two dimensional code.
Specifically, existing two dimensional code is by blocky (low-frequency square-wave) structure composition of black and white, frequency and scanning-printing device Sample frequency differ greatly, generated signal aliasing phenomenon is unobvious after resampling.In order to become apparent from this feature, easily produce Raw clear signal aliasing can be used for forming two dimensional code mould with halftoning dot matrix similar in scanning-printing device sample frequency Block, as shown in Figure 2.In Fig. 2, in the two dimensional code, the average brightness of halftoning dot matrix in the zone can be used to indicate to believe Breath, for example, the two dimensional code module in Fig. 2 has 16 different gray values, each gray value can carry the information of 4 bits. Each gray value accounts for the space of 4 × 4 modules in this example.It in actual use, can be according to encoded information, to modulate The gray value of each module in two dimensional code.
Preferably, the step S100 is specifically included:
Step S101, the input information for obtaining user, converts bit stream for user information by information source and channel coding;
In the present invention, the character of text message can be converted the another kind format as defined in character code library.No Same language has the encoding scheme/standard of oneself.For example, common standard is that ASCII(U.S. information is handed over for English character Change standard code).For Chinese character, common standard is UTF-8(Unicode).Other language also have the standard of oneself.Text message Character can be converted any other format as defined in character code library.Using character code library, text can be disappeared Single character code in breath is at the binary data code word with particular number of bits (for example, 8).It is encoded in text message Later, the front end of the message after header can be placed in coding.Here, header can indicate the decoding process of two-dimensional image code Character length and used encoding scheme in (being described later on) in message.
Furthermore it is anticipated that mistake (such as the original due to environment or channel may be introduced in two dimensional code transmission process Cause), this will damage data and the decoding 30 being finally likely to result in message fails.Therefore, in the present embodiment, information source Error correcting code can be used to protect data with the channel coding algorithm in channel coding module.It is any to can detecte and correct mistake Error correcting code can use.
As an example, the error correcting code of present embodiment can use Reed-institute Sieve door (Reed-Solomon) code.Error correcting code can detecte and correct the exception of multiple characters, including erasing and mistake.Its In, erasing refers to the mismark in known location.Mistake then refers to the mismark in unknown position.
Step S102, bit stream is modulated, is converted into gray value of image, then converted gray value of image to corresponding Halftoning dot matrix;
As an example, the modulation algorithm in this implementation can be with 3 bits as one group.According to taking for bit group Bit group, can be mapped to different gray values by value.For example, can by bit group 000,001,010,011,100,101,110, 111 are respectively mapped to gray value of image 30,60,90,120,150,180,210,240.
In addition, halftoning dot matrix conversion method in this implementation can according to the difference of each image-region gray value, according to According to the principle that average gray value is constant in image-region is kept, the round dot matrix with different size, density is converted thereof into.This Halftoning dot matrix transfer algorithm is the same with the corresponding algorithm principle built in printer.
Step S103, view finding pattern is added by the two dimensional code module of halftoning dot matrix composition, generates two dimensional code.
View finding pattern can contribute to position two-dimentional code position and measure appointing for its size in two dimensional code detection process What pattern, as long as it has label on the boundary of two dimensional code.In the present embodiment, view finding pattern is by bold portion With the rectangle frame (such as box) of dotted line (dotted line) part composition.In the reading of aftermentioned two-dimensional image code, positioning identifier can For two dimensional code and background to be distinguished.In positioning identifier, dotted portion can be used for positioning the seat of the block in two dimensional code Mark and the physical size for judging two dimensional code.
Specifically, the spectrum structure of the halftoning dot matrix are as follows:
Wherein, p is the two-dimensional coordinate of frequency spectrum,GIt (p) is the frequency spectrum of halftoning dot matrix,G wIt (p) is the halftoning of white point black matrix The frequency spectrum of dot matrix,G b(p) frequency spectrum of the halftoning dot matrix of difference stain white background,C wIndicate entire mould shared by white halftoning dot matrix The area of block,C bIndicate the area of entire module shared by black halftone dot matrix, a1And a2For the imaging sensor picture of capture apparatus The grid vector that element is constituted, b1And b2The grid vector being made of the halftoning dot matrix in two dimensional code generating process.α 1α 2 Withβ 1β 2It can be by a1、a2With b1、b2The normalized vector obtained after normalization.
With α1、α2For, normalized vector is defined as follows:
Wherein, | | it is the norm of vector.In addition,k 1k 2Andl 1l 2Indicate the length of vector,δ() is impulse function, SPOT () is the two-dimentional sampling function of imaging device, and APER () is the frequency spectrum of imaging device ambiguity function, and HDOT () is half color Adjust the frequency spectrum of point function.
The anti-copy implementation method of the two dimensional code, wherein the step S200 is specifically included:
Step S201, when having read the two dimensional code by dollying equipment, then image in 2 D code is obtained, and to two It ties up code image and carries out image recovery, restore shape distortion of the image in 2 D code in communication channel, the two dimensional code after being restored;
As an example, two dimensional code is first subjected to binary conversion treatment in this implementation, the brightness based on background and two dimensional code Difference is separated two dimensional code with bright background using dark areas detection algorithm.Specifically, need to only detect the view finding of two dimensional code Four angle points in pattern can separate it with background.
Due to the distortion of image in 2 D code in shooting process, the shape in acquired image in 2 D code region be can be arbitrarily Quadrangle.Since original two dimensional code image is square, square can be reduced into eliminate shape distortion.
Step S202, according to the two dimensional code after reduction, two dimensional code module is extracted, each two dimensional code module is carried out and is modulated Corresponding demodulation, obtains bit stream;
As an example, the module of two dimensional code can be extracted according to the dotted line point in view finding pattern.Specifically, may be used Monochrome pixels transfer point in view finding pattern edge dotted portion is as a reference point.Further, since the solid line portion of view finding pattern Divide a length of 7 modules.Therefore, the solid line part of view finding pattern can be divided into seven equal portions, to obtain corresponding reference point.With straight Line connects upper and lower two groups of reference points, equally connects left and right two groups of reference points.In this way, two dimensional code intermediate region Just by line segmentation at independent module one by one.
As an example, the demodulating algorithm in this implementation maps that corresponding according to different gray value of images Bit group.For example, gray value of image 30,60,90,120,150,180,210,240 can be respectively mapped to bit group 000, 001,010,011,100,101,110,111.In a practical situation, it needs first to gray value of image according to itself and preset gray scale Value, i.e., 30,60,90,120,150,180,210,240 distance is sorted out, and the gray value after classification will be set as 30,60, 90,120,150,180,210,240.
Step S203, bit stream is subjected to information source and channel decodes, obtain encoded information.
Preferably, the step S300 is specifically included:
Step S301, according to the two dimensional code after progress image recovery, two dimensional code module is extracted;
Step S302, spectrum analysis is carried out to the two dimensional code module, obtains signal period property feature;
As an example, the method for spectrum analysis can be with two-dimensional Fourier transform, two-dimension discrete cosine transform (DCT), two-dimensional discrete wavelet conversion (DWT), etc..The input of spectrum analysis is image in 2 D code module, is exported as picture signal 2-d spectrum.
Step S303, judge whether the distance between the extreme point of extreme point and calculating in spectrum analysis meets expected point Cloth then prompts the two dimensional code to carry out duplication operation when not meeting expected distribution.
As an example, the measurement of distance can be Euclidean distance.By comparing extreme point and meter in spectrum analysis The distance between extreme point of calculation, and be compared with preset threshold value, it can be seen that whether this image in 2 D code have passed through duplication Operation.Wherein, threshold value can be obtained by analyzing the original of a large amount of two dimensional codes with reproduction copies.
Signal aliasing feature vector model is one of key theory basis of this two dimensional code anti-copy.This model is established to help In analysis signal aliasing phenomenon, and identify by scanning-printing attack included multiple groups aliasing signal image in 2 D code.It utilizes Fourier transformation (or other frequency-domain transforms), analyzes frequency spectrum obtained, can effectively identify the two dimension attacked by scanning-printing Code.As shown in Fig. 3 a, 3b, 4a, 4b and Fig. 5, close to four extreme point { P of frequency spectrum origin1,P2,P3,P4Coordinate can be by The parameter (print resolution, halftoning reticular density, the pixel size of imaging sensor) of physical equipment is calculated.Pass through sight Whether the quantity for the extreme point surveyed in the image-region that four extreme points are surrounded and position meet expected distribution, can distinguish this Whether two dimensional code have passed through duplication operation.
As it can be seen that directly with the form design two dimensional code of halftoning dot matrix in the present invention, rather than in two dimensional code print procedure In by printer carry out brightness to the conversion of halftoning dot matrix, can achieve more stable detection effect in this way.
And it is based on halftoning dot matrix, and its signal resampling (week shown in print and scan-printing-shooting process Phase property) feature, identify the two dimensional code for passing through aforesaid operations.
Based on above method embodiment, the present invention also provides a kind of anti-copys of two dimensional code to realize system.As shown in fig. 6, The anti-copy of the two dimensional code realizes that system includes:
Two-dimensional code generation module 100, for obtaining the input information of user, after converting gray value of image for input information And increases view finding image and obtain two dimensional code;
Two dimensional code decoder module 200, for when obtaining the two dimensional code through shooting, then successively carrying out image recovery, solution It adjusts and decodes, obtain encoded information;
Two dimensional code authentication module 300 for carrying out spectrum analysis according to the two dimensional code after progress image recovery, and judges frequency Whether the extreme point that spectrum analysis obtains meets expected distribution, then prompts the two dimensional code to carry out duplication when not meeting expected distribution Operation.
Preferably, in the anti-copy realization system of the two dimensional code, the two-dimensional code generation module 100 is specifically included:
Information source and channel encoding unit are believed user by information source and channel coding for obtaining the input information of user Breath is converted into bit stream;
Modulation unit is converted into gray value of image for bit stream to be modulated, then converts gray value of image to pair The halftoning dot matrix answered;
Image adding unit generates two dimension for adding view finding pattern by the two dimensional code module that halftoning dot matrix forms Code.
Preferably, in the anti-copy realization system of the two dimensional code, the spectrum structure of the halftoning dot matrix are as follows:
Wherein, p is the two-dimensional coordinate of frequency spectrum,GIt (p) is the frequency spectrum of halftoning dot matrix,G wIt (p) is the halftoning of white point black matrix The frequency spectrum of dot matrix,G b(p) frequency spectrum of the halftoning dot matrix of difference stain white background,C wIndicate entire mould shared by white halftoning dot matrix The area of block,C bIndicate the area of entire module shared by black halftone dot matrix, a1And a2For the imaging sensor picture of capture apparatus The grid vector that element is constituted, b1And b2The grid vector being made of the halftoning dot matrix in two dimensional code generating process.α 1α 2 Withβ 1β 2It can be by a1、a2With b1、b2The normalized vector obtained after normalization.
Preferably, in the anti-copy realization system of the two dimensional code, the two dimensional code decoder module 200 is specifically included:
Image restoration unit, for when having read the two dimensional code by dollying equipment, then obtaining two dimensional code figure Picture, and image recovery is carried out to image in 2 D code, shape distortion of the image in 2 D code in communication channel is restored, after obtaining reduction Two dimensional code;
Demodulating unit, for extracting two dimensional code module according to the two dimensional code after reduction, to each two dimensional code module carry out with Corresponding demodulation is modulated, bit stream is obtained;
Information source and channel decoding unit obtain encoded information for bit stream to be carried out information source and channel decoding.
Preferably, in the anti-copy realization system of the two dimensional code, the two dimensional code authentication module 300 is specifically included:
Module extraction unit, for extracting two dimensional code module according to the two dimensional code after progress image recovery;
Spectral analysis unit obtains signal period property feature for carrying out spectrum analysis to the two dimensional code module;
Judging unit, for judging it is pre- whether the distance between the extreme point in spectrum analysis and the extreme point of calculating meet Phase distribution then prompts the two dimensional code to carry out duplication operation when not meeting expected distribution.
In conclusion the anti-copy implementation method and realization system of two dimensional code provided by the present invention, method includes: to obtain The input information of user converts input information to after gray value of image and increases view finding image and obtain two dimensional code;When through shooting When obtaining the two dimensional code, then image recovery, demodulation and decoding are successively carried out, encoded information is obtained;According to progress image recovery Two dimensional code afterwards carries out spectrum analysis, and judges whether the extreme point that spectrum analysis obtains meets expected distribution, pre- when not meeting Phase then prompts the two dimensional code to carry out duplication operation when being distributed.The present invention combines the communication of the two dimensional code in scanning-print procedure Channel model and physical equipment feature are being guaranteed by the picture signal resampling spectrum signature in analysis scanning-printing On the basis of low resolution dollying equipment reads robustness to two dimensional code, propose to utilize the aliased features of picture signal and strong The method of correlated noise feature is obtained to the effective evidence obtaining of two-dimensional code scanning-printing attack.
It should be understood that the application of the present invention is not limited to the above for those of ordinary skills can With improvement or transformation based on the above description, all these modifications and variations all should belong to the guarantor of appended claims of the present invention Protect range.

Claims (10)

1. a kind of anti-copy implementation method of two dimensional code, which is characterized in that the described method comprises the following steps:
A, the input information of user is obtained, converts input information to after gray value of image and increase view finding image and obtain two dimension Code;
B, when obtaining the two dimensional code through shooting, then image recovery, demodulation and decoding is successively carried out, encoded information is obtained;
C, spectrum analysis is carried out according to the two dimensional code after progress image recovery, and judges whether the extreme point that spectrum analysis obtains accords with Expected distribution is closed, the two dimensional code is then prompted to carry out duplication operation when not meeting expected distribution.
2. the anti-copy implementation method of two dimensional code according to claim 1, which is characterized in that the step A is specifically included:
A1, the input information for obtaining user, convert bit stream for user information by information source and channel coding;
A2, bit stream is modulated, is converted into gray value of image, then convert corresponding half tone dot for gray value of image Battle array;
A3, view finding pattern is added by the two dimensional code module of halftoning dot matrix composition, generate two dimensional code.
3. the anti-copy implementation method of two dimensional code according to claim 2, which is characterized in that the frequency spectrum of the halftoning dot matrix Structure are as follows:
Wherein, p is the two-dimensional coordinate of frequency spectrum,GIt (p) is the frequency spectrum of halftoning dot matrix,G wIt (p) is the halftoning dot matrix of white point black matrix Frequency spectrum,G b(p) frequency spectrum of the halftoning dot matrix of difference stain white background,C wIndicate entire module shared by white halftoning dot matrix Area,C bIndicate the area of entire module shared by black halftone dot matrix, a1And a2For the image sensor pixel institute of capture apparatus The grid vector of composition, b1And b2The grid vector being made of the halftoning dot matrix in two dimensional code generating process,α 1α 2Withβ 1β 2It can be by a1、a2With b1、b2The normalized vector obtained after normalization;
| | it is the norm of vector, k1, k2 and l1, l2 indicate the length of vector, and δ () is impulse function, and SPOT () is imaging The two-dimentional sampling function of equipment, APER () are the frequency spectrum of imaging device ambiguity function, and HDOT () is the frequency of half tone dot function Spectrum.
4. the anti-copy implementation method of two dimensional code according to claim 3, which is characterized in that the step B is specifically included:
B1, when having read the two dimensional code by dollying equipment, then obtain image in 2 D code, and to image in 2 D code into Row image restores, and restores shape distortion of the image in 2 D code in communication channel, the two dimensional code after being restored;
B2, according to the two dimensional code after reduction, extract two dimensional code module, solution corresponding with modulation carried out to each two dimensional code module It adjusts, obtains bit stream;
B3, bit stream is carried out to information source and channel decoding, obtains encoded information.
5. the anti-copy implementation method of two dimensional code according to claim 4, which is characterized in that the step C is specifically included:
C1, according to carry out image recovery after two dimensional code, extract two dimensional code module;
C2, spectrum analysis is carried out to the two dimensional code module, obtains signal period property feature;
C3, judge whether the distance between the extreme point in spectrum analysis and the extreme point of calculating meet expected distribution, when not being inconsistent The two dimensional code is then prompted to carry out duplication operation when closing expected distribution.
6. system is realized in a kind of anti-copy of two dimensional code characterized by comprising
Two-dimensional code generation module for obtaining the input information of user converts input information to after gray value of image and increases View finding image obtains two dimensional code;
Two dimensional code decoder module, for when obtaining the two dimensional code through shooting, then successively carrying out image recovery, demodulation and solution Code, obtains encoded information;
Two dimensional code authentication module for carrying out spectrum analysis according to the two dimensional code after progress image recovery, and judges spectrum analysis Whether obtained extreme point meets expected distribution, and the two dimensional code is then prompted to carry out duplication operation when not meeting expected distribution.
7. system is realized in the anti-copy of two dimensional code according to claim 6, which is characterized in that the two-dimensional code generation module tool Body includes:
Information source and channel encoding unit are turned user information by information source and channel coding for obtaining the input information of user Turn to bit stream;
Modulation unit is converted into gray value of image for bit stream to be modulated, then converts gray value of image to corresponding Halftoning dot matrix;
Image adding unit generates two dimensional code for adding view finding pattern by the two dimensional code module that halftoning dot matrix forms.
8. system is realized in the anti-copy of two dimensional code according to claim 7, which is characterized in that the frequency spectrum of the halftoning dot matrix Structure are as follows:
Wherein, p is the two-dimensional coordinate of frequency spectrum,GIt (p) is the frequency spectrum of halftoning dot matrix,G wIt (p) is the halftoning dot matrix of white point black matrix Frequency spectrum,G b(p) frequency spectrum of the halftoning dot matrix of difference stain white background,C wIndicate entire module shared by white halftoning dot matrix Area,C bIndicate the area of entire module shared by black halftone dot matrix, a1And a2For the image sensor pixel institute of capture apparatus The grid vector of composition, b1And b2The grid vector being made of the halftoning dot matrix in two dimensional code generating process,α 1α 2Withβ 1β 2It can be by a1、a2With b1、b2The normalized vector obtained after normalization;
| | it is the norm of vector, k1, k2 and l1, l2 indicate the length of vector, and δ () is impulse function, and SPOT () is imaging The two-dimentional sampling function of equipment, APER () are the frequency spectrum of imaging device ambiguity function, and HDOT () is the frequency of half tone dot function Spectrum.
9. system is realized in the anti-copy of two dimensional code according to claim 8, which is characterized in that the two dimensional code decoder module tool Body includes:
Image restoration unit, for when having read the two dimensional code by dollying equipment, then obtaining image in 2 D code, and Image recovery is carried out to image in 2 D code, restores shape distortion of the image in 2 D code in communication channel, color/luminance distortion, Two dimensional code after being restored;
Demodulating unit carries out demodulation corresponding with modulation for the two dimensional code after restoring, obtains bit stream;
Information source and channel decoding unit obtain encoded information for bit stream to be carried out information source and channel decoding.
10. system is realized in the anti-copy of two dimensional code according to claim 9, which is characterized in that the two dimensional code authentication module It specifically includes:
Module extraction unit, for extracting two dimensional code module according to the two dimensional code after progress image recovery;
Spectral analysis unit obtains signal period property feature for carrying out spectrum analysis to the two dimensional code module;
Judging unit, for judging whether the distance between the extreme point in spectrum analysis and the extreme point of calculating meet expected point Cloth then prompts the two dimensional code to carry out duplication operation when not meeting expected distribution.
CN201610956300.6A 2016-10-28 2016-10-28 A kind of the anti-copy implementation method and realization system of two dimensional code Active CN106529637B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201610956300.6A CN106529637B (en) 2016-10-28 2016-10-28 A kind of the anti-copy implementation method and realization system of two dimensional code
PCT/CN2016/105867 WO2018076409A1 (en) 2016-10-28 2016-11-15 Method for realizing two dimensional code copy prevention and realization system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610956300.6A CN106529637B (en) 2016-10-28 2016-10-28 A kind of the anti-copy implementation method and realization system of two dimensional code

Publications (2)

Publication Number Publication Date
CN106529637A CN106529637A (en) 2017-03-22
CN106529637B true CN106529637B (en) 2019-06-25

Family

ID=58325667

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610956300.6A Active CN106529637B (en) 2016-10-28 2016-10-28 A kind of the anti-copy implementation method and realization system of two dimensional code

Country Status (2)

Country Link
CN (1) CN106529637B (en)
WO (1) WO2018076409A1 (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107180216B (en) * 2017-06-07 2020-06-30 福州觉感视觉软件科技有限公司 Two-dimensional code generation and identification method
CN107766771B (en) * 2017-11-15 2021-01-19 深圳大学 Two-dimensional code detection method and terminal
CN107835332B (en) * 2017-11-15 2019-07-05 深圳大学 It is superimposed the two-dimensional code generation method and device of man made noise's information
WO2019095173A1 (en) * 2017-11-15 2019-05-23 深圳大学 Method and device for generating two-dimensional code superimposed with artificial noise information
WO2019095172A1 (en) * 2017-11-15 2019-05-23 深圳大学 Qr code generating and decoding method and apparatus in qr code copying process
CN107918791B (en) * 2017-11-15 2020-10-09 深圳大学 Two-dimensional code generating and decoding method and device in two-dimensional code copying process
CN108122020A (en) * 2017-12-08 2018-06-05 北京小米移动软件有限公司 Two-dimensional code generation method and device and two-dimensional code identification method and device
CN109711513B (en) * 2018-12-21 2023-06-27 北京印刷学院 Triple anti-counterfeiting two-dimensional code with double-code of digital fluorescent image overprinting bright and dark
CN109829844B (en) * 2019-01-16 2024-01-12 王诗会 Information hiding method and device based on two-dimension code and electronic equipment
CN109861815A (en) * 2019-01-18 2019-06-07 深圳大学 The bootlegging channel modeling method and system of two dimensional code
CN110033067B (en) * 2019-03-31 2020-06-02 深圳大学 Anti-copy two-dimensional code and anti-counterfeiting authentication method of two-dimensional code
CN110335189B (en) * 2019-05-31 2024-01-16 平安科技(深圳)有限公司 Method, device, computer equipment and storage medium for filling anti-counterfeiting information
CN111160063B (en) * 2020-04-03 2020-09-04 杭州涂鸦信息技术有限公司 Internet of things IPC two-dimensional code distribution network image enhancement method and system
CN113242107B (en) * 2020-12-27 2024-08-06 南京飞搏数据技术有限公司 Two-dimensional code transmission protocol
CN112847349B (en) * 2020-12-30 2022-05-06 深兰科技(上海)有限公司 Robot walking control method and device
CN113792600B (en) * 2021-08-10 2023-07-18 武汉光庭信息技术股份有限公司 Video frame extraction method and system based on deep learning
CN114820827B (en) * 2022-05-06 2024-10-15 翼存(上海)智能科技有限公司 Data decoding method for rectangular gray-scale dot matrix image for data storage
CN115035533B (en) * 2022-08-10 2022-10-21 新立讯科技股份有限公司 Data authentication processing method and device, computer equipment and storage medium
CN116776909B (en) * 2023-08-28 2023-11-03 四川星点网络技术有限公司 Bottle lid two-dimensional code system of tracing to source

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008009826A2 (en) * 2006-07-19 2008-01-24 Advanced Track & Trace Methods and devices for securing and authenticating documents
JP2010246027A (en) * 2009-04-09 2010-10-28 Canon Inc Image forming apparatus, image forming method, and computer program
CN201927049U (en) * 2010-12-27 2011-08-10 陆宝武 Anti-counterfeiting detection device
CN103377442B (en) * 2012-04-25 2017-08-22 阿里巴巴集团控股有限公司 A kind of data processing method and system
CN103745151B (en) * 2014-01-08 2017-01-25 杭州晟元数据安全技术股份有限公司 Method for authenticating identity through combination of two-dimension codes and dynamic passwords
CN103870863B (en) * 2014-03-14 2016-08-31 华中科技大学 Preparation is hidden the method for image in 2 D code holographic false proof label and identifies device
CN103886545B (en) * 2014-04-17 2017-05-10 上海出版印刷高等专科学校 Transformation domain printing-scanning resistant digital watermarking method based on computer-generated holography
US9418326B1 (en) * 2015-04-30 2016-08-16 International Business Machines Corporation Enhanced quick response codes
CN205015906U (en) * 2015-07-24 2016-02-03 熊小军 Anti -fake verification system of electron certificate
CN105718981B (en) * 2016-01-26 2019-04-30 南京风力舰信息技术有限公司 A kind of processing method preparing New Two Dimensional code image holographic false proof label
CN105758381B (en) * 2016-05-09 2018-05-22 深圳大学 A kind of camera module method for detecting its tilt based on spectrum analysis

Also Published As

Publication number Publication date
WO2018076409A1 (en) 2018-05-03
CN106529637A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN106529637B (en) A kind of the anti-copy implementation method and realization system of two dimensional code
CN107918791B (en) Two-dimensional code generating and decoding method and device in two-dimensional code copying process
Tkachenko et al. Two-level QR code for private message sharing and document authentication
JP4137084B2 (en) Method for processing documents with fraud revealing function and method for validating documents with fraud revealing function
Celik et al. Hierarchical watermarking for secure image authentication with localization
KR100982616B1 (en) Image decrypting apparatus, image encrypting apparatus, image decrypting method and recording medium having program thereof
CA2115905C (en) Secure personal identification instrument and method for creating same
US6831990B2 (en) System and method for image tamper detection via thumbnail hiding
Abdelhakim et al. Fragile watermarking for image tamper detection and localization with effective recovery capability using K-means clustering
JP2000299778A (en) Method and device for adding watermark, method and device for reading and recording medium
JP2003264685A (en) Document image output method and apparatus, tampering judging method and system, and program for controlling tampering judging system
CN103886545A (en) Transformation domain printing-scanning resistant digital watermarking method based on computer-generated holography
CA2374196A1 (en) Legitimacy protection of electronic document and a printed copy thereof
JP2001274980A (en) Printed matter and information security system using the printed matter
CN111738898B (en) Text digital watermark embedding/extracting method and device
US6636614B1 (en) Method for preventing the falsification of documents comprising a photograph, preferably a facial-view photograph
US20100142756A1 (en) Document security method
CN109190340A (en) A kind of webpage digital watermarking generates, identification, Method of printing and device
Chang et al. A block-based watermarking scheme for image tamper detection and self-recovery
JP4143441B2 (en) Information processing method and apparatus, computer program, and computer-readable storage medium
Ni et al. Pinpoint authentication watermarking based on a chaotic system
CN113012018B (en) Invisible office printing text encryption and decryption method
CN110430334A (en) A kind of mosaic camouflage and restoration methods based on the superposition of fan-shaped patterning unit
CN110417551B (en) Character and picture generation type camouflage and recovery method combined with error diffusion
CN114078071A (en) Image tracing method, device and medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant