CN107203798B - A kind of generation and recognition methods limiting access type figure ground two dimensional code - Google Patents

A kind of generation and recognition methods limiting access type figure ground two dimensional code Download PDF

Info

Publication number
CN107203798B
CN107203798B CN201710372064.8A CN201710372064A CN107203798B CN 107203798 B CN107203798 B CN 107203798B CN 201710372064 A CN201710372064 A CN 201710372064A CN 107203798 B CN107203798 B CN 107203798B
Authority
CN
China
Prior art keywords
matrix
dimensional code
column
row
data
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
CN201710372064.8A
Other languages
Chinese (zh)
Other versions
CN107203798A (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.)
Nanjing Post and Telecommunication University
Original Assignee
Nanjing Post and Telecommunication 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 Nanjing Post and Telecommunication University filed Critical Nanjing Post and Telecommunication University
Priority to CN201710372064.8A priority Critical patent/CN107203798B/en
Publication of CN107203798A publication Critical patent/CN107203798A/en
Application granted granted Critical
Publication of CN107203798B publication Critical patent/CN107203798B/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/06046Constructional details
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/04Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
    • H04L63/0428Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/06Network architectures or network communication protocols for network security for supporting key management in a packet data network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • Complex Calculations (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

The invention discloses a kind of generations and recognition methods for limiting access type figure ground two dimensional code, generation phase: data are classified, all data are arranged with a matrix type, the secure key data of high priority is incorporated by encoder in the obscuring layer of the low resolution of the two dimensional code, the practical communication data of low priority are incorporated into the high-resolution high definition layer of the two dimensional code, it realizes the stealth of secure key data, and is finally mapped as two dimensional code.Cognitive phase: extracting image in 2 D code, first in a manner of fuzzy DSP, extracts high priority hidden safety key, key data is correct, it was demonstrated that the two-dimension code safe, then barcode scanning people has corresponding permission, high definition DSP is carried out to two dimensional code again, actual communication data is extracted by decoder.Present invention limitation uses crowd, when having key be assigned to and packaged (permission to access), can decode complete information;When not having (lack of competence), the essential information of no security risk can only be decoded.

Description

A kind of generation and recognition methods limiting access type figure ground two dimensional code
Technical field
The present invention relates to a kind of generations and recognition methods for limiting access type figure ground two dimensional code, and in particular to Yi Zhongtong The generation and recognition methods for crossing the limitation access type figure ground two dimensional code of wavelet transformation realization, belong to image information encoding and decoding skill Art field.
Background technique
With the rise of personal electric payment industry, with it, easily and efficiently advantage is widely used two dimensional code. Two dimensional code is to be used to record in the chequered with black and white figure of two-dimensional surface distribution by certain rule with certain particular geometric figure Numerical chracter information.The concept of " 0 ", " 1 " bit stream, black pattern counterlogic " 1 " ratio are dexterously utilized in code compilation Spy, white pattern counterlogic " 0 " bit, two dimensional code can in the both direction of a plane expressing information simultaneously, therefore very little Two dimensional code have storage bulk information ability.It is shown by image input device, by photoelectric scanning device according to rule Then automatically identified.
In recent years, criminal is by being implanted into the case where fishing website, virus etc. carry out financial crime repeatly in two dimensional code See it is not fresh, however two dimensional code it as acting on for internet interface apparently there is irreplaceability at present, therefore how to guarantee People are not utilized while being communicated using two dimensional code by criminal, it would be highly desirable to solve, so one kind can provide safety The two dimensional code of identification is just ready to appear.
Summary of the invention
The technical problems to be solved by the present invention are: providing a kind of generation and knowledge for limiting access type figure ground two dimensional code Other method needs to be added and read hidden safety key with high priority when generating and identifying two dimensional code, is made with limitation Crowd ensures the information security of two-dimentional code communication.
The present invention uses following technical scheme to solve above-mentioned technical problem:
A kind of generation and recognition methods limiting access type figure ground two dimensional code, the generation method include following step It is rapid:
Step 1, key data is added in original communication data, forms binary data, binary data is carried out The highest priority of classification and key data;
Step 2, key data and all communication datas are converted into the square matrix that element value is -1 or 1, and each side The row, column of battle array is all equal, all square matrixes is combined into matrix D, the form of D is as follows:
Step 3, the quick Haar wavelet transform inverse transformation of 2D is carried out to matrix D, is converted to matrix X, it is small used in conversion process Wave conversion order of matrix number is equal with the line number of matrix D or columns;
Step 4, matrix X is mapped as two dimensional code, the size of the two dimensional code is the line number of matrix X and the product of columns, square Each element corresponds to a color lump of two dimensional code in battle array X, indicates these color lumps with normalized gray scale, obtains figure ground two Tie up code;
The recognition methods includes the following steps:
Step 5, figure ground two dimensional code is extracted, figure ground two dimensional code is converted to by matrix by image procossing;
Step 6, the key data in matrix that step 5 obtains is decoded come solution by 2D quick haar wavelet transform Code process used in wavelet transform matrix order be matrix D line number or columns 1/2;
Step 7, key data information is checked, if key checks mistake, not decoded communications data, if key verification is just Really, then by the quick haar wavelet transform of 2D by matrix that step 5 obtains key data and communication data decode come, The order of wavelet transform matrix used in decoding process is equal with the line number of matrix D or columns.
As a preferred solution of the present invention, step 3 conversion formula are as follows:
Wherein, Xu,vThe element of representing matrix X u row v column, dm,nThe element of representing matrix D m row n column, p are matrix D Line number or columns, HpFor p row p column wavelet transform matrix,Indicate HpThe element of line n v column,Indicate HpM row u The element of column.
As a preferred solution of the present invention, the wavelet transform matrix HpForm it is as follows:
As a preferred solution of the present invention, the formula of the quick haar wavelet transform of 2D described in step 6 are as follows:
Wherein,Indicate the element of matrix m row n column for decoding,Expression is obtained through step 5 image procossing Matrix u row v column element, HqFor q row q column wavelet transform matrix, q=p/2,Indicate HqThe element of line n v column,Indicate HqThe element of m row u column.
As a preferred solution of the present invention, the formula of the quick haar wavelet transform of 2D described in step 7 are as follows:
Wherein,Indicate the element of matrix m row n column for decoding,Expression is obtained through step 5 image procossing Matrix u row v column element, HpFor p row p column wavelet transform matrix,Indicate HpThe element of line n v column,Table Show HpThe element of m row u column.
The invention adopts the above technical scheme compared with prior art, has following technical effect that
1, the method for the present invention has the effect of limitation using crowd, (has when having key be assigned to and packaged Permission access), complete information can be decoded;When not having (lack of competence), the basic letter of no security risk can only be decoded Breath.
2, the method for the present invention has the effect of that safety is preferential, is read out according to data priority to two dimensional code, and safety is close The highest priority of key.
3, the method for the present invention introduces the concept of level: high definition layer and obscuring layer in two dimensional code.
It 4, is that dominant safe color lump, easily quilt are added in two dimensional code mostly compared to existing safe planar bar code technology It copies or cracks;And the method for the present invention is the image that the secure data of high priority is incorporated into two dimensional code with certain coding rule In, there is stealthy characteristic.
Detailed description of the invention
Fig. 1 is the integrated stand composition of generation and the recognition methods of present invention limitation access type figure ground two dimensional code.
Fig. 2 is the flow chart of generation phase in the method for the present invention.
Fig. 3 is the flow chart of cognitive phase in the method for the present invention.
Fig. 4 is two levels of a two dimensional code embodiment in the method for the present invention.
Specific embodiment
Embodiments of the present invention are described below in detail, the example of the embodiment is shown in the accompanying drawings.Below by The embodiment being described with reference to the drawings is exemplary, and for explaining only the invention, and is not construed as limiting the claims.
As shown in Figure 1, the present invention proposes that a kind of limitation access type figure ground two dimensional code realized by wavelet transformation is raw At identification technology, limitation can be applied to using crowd, be assigned to and when packaged key (permission to access) when having, Complete information can be decoded;When not having (lack of competence), the essential information of no security risk can only be decoded.It is not continued to use Existing two dimensional code standard but the image background with two dimensional code.Image in 2 D code of the invention can be imitated, but because not It with packaged security key (lack of competence), also can not further be accessed, be realized by limitation access crowd and more pacified Complete two-dimentional code communication.When generation: utilizing quick Haar wavelet transform inverse transformation (IFHWT:inverse fast Haar wavelet Transform), data are encoded, the key data of high priority is incorporated into the obscuring layer of the low resolution of the two dimensional code In, the real data of low priority is incorporated into the high-resolution high definition layer of the two dimensional code, realizes the stealth of key data.Know When other: utilizing quick haar wavelet transform (FHWT:fast Haar wavelet transform), first with fuzzy DSP (number Signal processing) mode, extract high priority stealth code key, key data is correct, it was demonstrated that the two-dimension code safe, then to two dimensional code High definition DSP is carried out, the data of actual needs transmission is extracted, keeps two-dimentional code communication safer.
The method of the present invention includes two stages: generation phase and cognitive phase.
1, as shown in Fig. 2, generation phase includes the following steps:
Step 1: binary data being classified, key data highest priority, other actual communication datas can be with Assign medium or low priority;
Step 2: binary data being encoded, key and practical communication data are respectively put into the two of a two dimensional code In layer;
Step 2-1: all data are arranged with a matrix type, arrangement mode are as follows:
Wherein element value is -1 or 1 in D matrix, wherein the data of m row, n column are dm,n
Step 2-2: 2D IFHWT transformation is carried out to above-mentioned data, converts matrix X for the data matrix D of input, then square The element of battle array X u row, v column are as follows:
HereFor matrix HpOne element of m row, n column, the H of p row p columnpTransformation matrix is as follows:
Step 3: matrix X being mapped as to the two dimensional code of pixel p*p, i.e. each of matrix element corresponds to two dimensional code A color lump, the element value in matrix X becomes { 0,1/4,1/2,3/4,1 }, this simple each pixel of two dimensional code is gathered around There are 5 values, can be indicated with 5 normalized gray scales, forms the black white image with two dimensional code feature.
2, as shown in figure 3, cognitive phase includes the following steps:
Step 1: two dimensional code is extracted;
Step 2: image procossing, as obscuring layer being carried out to two dimensional code in a manner of fuzzy DSP, at this time script pixel p* The two dimensional code of p then becomes the two dimensional code (q=p/2) of pixel q*q, this is the concept based on average gray, i.e., several adjacent Pixel has certain average gray.At this moment, practical communication data portion information is lost, only remaining priority in two-dimensional barcode information Higher key data can be converted by q rank 2D FHWT and be decoded come decoding process are as follows:
Key information is reduced;
Step 3: verification key information;
Step 3-1: key checks mistake, does not carry out high definition DSP processing to two dimensional code, does not decode real data, guarantees logical The safety of letter;
Step 3-2: key verification is correct, carries out high definition DSP processing to two dimensional code, converts decoding institute by p rank 2D FHWT Some data restore the communication information, as high definition layer, decoding process are as follows:
Below using the two dimensional code of pixel 16*16 as embodiment:
1, binary data is classified, according to aforementioned claim, the placement regulation of matrix is as follows:
D11、D12、D21、D22It is the matrix of 8*8, wherein D11For the security key of high priority, other are medium or low The practical communication data of priority.
2, it generates two dimensional code and identifies that the process difference of two dimensional code is as shown in Figures 2 and 3, wherein 2D IFHWT and 2D FHWT mathematical model respectively indicates are as follows:
3, FHWT transformation in core transformation matrix HpLiterary style rule it is as follows, by 8 ranks, 16 ranks distinguish for, with such It pushes away:
4, the two dimensional code of pixel 16*16, its high definition layer and obscuring layer are as shown in Figure 4.
The above examples only illustrate the technical idea of the present invention, and this does not limit the scope of protection of the present invention, all According to the technical idea provided by the invention, any changes made on the basis of the technical scheme each falls within the scope of the present invention Within.

Claims (5)

1. a kind of generation and recognition methods for limiting access type figure ground two dimensional code, which is characterized in that the generation method packet Include following steps:
Step 1, key data is added in original communication data, forms binary data, binary data is classified And the highest priority of key data;
Step 2, key data and all communication datas are converted into element value as -1 or 1 square matrix, and each square matrix Row, column is all equal, all square matrixes is combined into matrix D, the form of D is as follows:
Step 3, the quick Haar wavelet transform inverse transformation of 2D is carried out to matrix D, is converted to matrix X, small echo used in conversion process becomes It is equal with the line number of matrix D or columns to change order of matrix number;
Step 4, matrix X is mapped as two dimensional code, the size of the two dimensional code is the line number of matrix X and the product of columns, in matrix X Each element corresponds to a color lump of two dimensional code, indicates these color lumps with normalized gray scale, obtains figure ground two dimensional code;
The recognition methods includes the following steps:
Step 5, figure ground two dimensional code is extracted, figure ground two dimensional code is converted to by matrix by image procossing;
Step 6, the matrix that step 5 obtains is handled in a manner of fuzzy digit signal processing to obtain obscuring layer, then is passed through The quick haar wavelet transform of 2D decodes the key data in obscuring layer to come, wavelet transform matrix used in decoding process Order be matrix D line number or columns 1/2;
Step 7, key data information is checked, if key checks mistake, not decoded communications data;If key verification is correct, High-definition digital signal processing is carried out to the matrix that step 5 obtains, high definition layer information is extracted, that is, passes through the quick haar wavelet transform of 2D By in matrix that step 5 obtains key data and communication data decode, wavelet transformation square used in decoding process The order of battle array is equal with the line number of matrix D or columns.
2. limiting the generation and recognition methods of access type figure ground two dimensional code according to claim 1, which is characterized in that institute State step 3 conversion formula are as follows:
Wherein, Xu,vThe element of representing matrix X u row v column, dm,nThe element of representing matrix D m row n column, p are the line number of matrix D Or columns, HpFor p row p column wavelet transform matrix,Indicate HpThe element of line n v column,Indicate HpM row u column Element.
3. limiting the generation and recognition methods of access type figure ground two dimensional code according to claim 2, which is characterized in that institute State wavelet transform matrix HpForm it is as follows:
4. limiting the generation and recognition methods of access type figure ground two dimensional code according to claim 2, which is characterized in that step The formula of the rapid 6 quick haar wavelet transform of 2D are as follows:
Wherein,Indicate the element of matrix m row n column for decoding,Indicate the square obtained through step 5 image procossing The element of battle array u row v column, HqFor q row q column wavelet transform matrix, q=p/2,Indicate HqThe element of line n v column,Indicate HqThe element of m row u column.
5. limiting the generation and recognition methods of access type figure ground two dimensional code according to claim 1, which is characterized in that step The formula of the rapid 7 quick haar wavelet transform of 2D are as follows:
Wherein,Indicate the element of matrix m row n column for decoding,Indicate the square obtained through step 5 image procossing The element of battle array u row v column, HpFor p row p column wavelet transform matrix,Indicate HpThe element of line n v column,Indicate Hp The element of m row u column.
CN201710372064.8A 2017-05-24 2017-05-24 A kind of generation and recognition methods limiting access type figure ground two dimensional code Active CN107203798B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710372064.8A CN107203798B (en) 2017-05-24 2017-05-24 A kind of generation and recognition methods limiting access type figure ground two dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710372064.8A CN107203798B (en) 2017-05-24 2017-05-24 A kind of generation and recognition methods limiting access type figure ground two dimensional code

Publications (2)

Publication Number Publication Date
CN107203798A CN107203798A (en) 2017-09-26
CN107203798B true CN107203798B (en) 2019-10-01

Family

ID=59906118

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710372064.8A Active CN107203798B (en) 2017-05-24 2017-05-24 A kind of generation and recognition methods limiting access type figure ground two dimensional code

Country Status (1)

Country Link
CN (1) CN107203798B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109241807B (en) * 2018-08-17 2021-04-20 湖南大学 Remote two-dimensional code positioning method
CN113110778A (en) * 2021-04-20 2021-07-13 树根互联股份有限公司 Graphical interface display method, terminal, readable storage medium and electronic equipment
CN116776909B (en) * 2023-08-28 2023-11-03 四川星点网络技术有限公司 Bottle lid two-dimensional code system of tracing to source

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103226723A (en) * 2013-04-26 2013-07-31 福建鸿博印刷股份有限公司 Combined two-dimensional code anti-counterfeiting method capable of preventing copy
WO2013155603A1 (en) * 2012-04-20 2013-10-24 A Thinking Ape Technologies Systems and methods for displaying animations on a mobile device
CN103646265A (en) * 2013-11-26 2014-03-19 鸿博股份有限公司 Two-dimensional code anti-counterfeiting method based on near infrared spectrum analysis
CN103886545A (en) * 2014-04-17 2014-06-25 上海理工大学 Transformation domain printing-scanning resistant digital watermarking method based on computer-generated holography
CN104268498A (en) * 2014-09-29 2015-01-07 杭州华为数字技术有限公司 Two-dimension code recognition method and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9843475B2 (en) * 2012-12-09 2017-12-12 Connectwise, Inc. Systems and methods for configuring a managed device using an image

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013155603A1 (en) * 2012-04-20 2013-10-24 A Thinking Ape Technologies Systems and methods for displaying animations on a mobile device
CN103226723A (en) * 2013-04-26 2013-07-31 福建鸿博印刷股份有限公司 Combined two-dimensional code anti-counterfeiting method capable of preventing copy
CN103646265A (en) * 2013-11-26 2014-03-19 鸿博股份有限公司 Two-dimensional code anti-counterfeiting method based on near infrared spectrum analysis
CN103886545A (en) * 2014-04-17 2014-06-25 上海理工大学 Transformation domain printing-scanning resistant digital watermarking method based on computer-generated holography
CN104268498A (en) * 2014-09-29 2015-01-07 杭州华为数字技术有限公司 Two-dimension code recognition method and terminal

Also Published As

Publication number Publication date
CN107203798A (en) 2017-09-26

Similar Documents

Publication Publication Date Title
CN105224974B (en) The method and method for anti-counterfeit of hiding information in a kind of matrix two-dimensional code
Rani et al. Data security through qr code encryption and steganography
CN107203798B (en) A kind of generation and recognition methods limiting access type figure ground two dimensional code
CN104616244B (en) Image watermark insertion and extracting method based on BP neutral net compression domains
Majumder et al. Singular value decomposition and wavelet‐based iris biometric watermarking
CN110766594B (en) Information hiding method and device, detection method and device and anti-counterfeiting tracing method
Kim et al. Self-embedding fragile watermarking scheme to detect image tampering using AMBTC and OPAP approaches
CN109191361A (en) Image Watermarking, extracting method and correlation technique
CN107944527A (en) A kind of encryption of anti-fake two-dimension code and coding/decoding method
CN103426141A (en) Method and system for authenticating image contents
Wu et al. SVD-based self-embedding image authentication scheme using quick response code features
Shivani et al. Robust image embedded watermarking using DCT and listless SPIHT
CN109816077A (en) A kind of hidden method of two-dimensional barcode information, device, electronic equipment and storage medium
Ali et al. Image steganography technique by using Braille method of blind people (LSBraille)
CN114461988A (en) Image encryption method and device, image decryption method and device
CN104573781B (en) A kind of Quick Response Code encoding and decoding method
Wu Quantization-based image authentication scheme using QR error correction
CN101817268A (en) Application of digital watermarking in RFID technology
Elbasi et al. Robust, secure and semi-blind watermarking technique using flexible scaling factor in block-based wavelet algorithm
Pan et al. New reversible full‐embeddable information hiding method for vector quantisation indices based on locally adaptive complete coding list
De Li et al. Research on anti-counterfeiting technology based on QR code image watermarking algorithm
Yeh et al. High-payload data-hiding method for AMBTC decompressed images
Zheng et al. A novel steganography-based pattern for print matter anti-counterfeiting by smartphone cameras
CN115526282A (en) Watermark encryption method, watermark extraction method, device and storage medium
Tsui et al. A New Adaptive Steganographic Method Based on Gradient Adjacent Prediction and Side-Match Vector Quantization.

Legal Events

Date Code Title Description
PB01 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