CN105976004B - A kind of color 2 D code multidimensional information coding, coding/decoding method and device - Google Patents

A kind of color 2 D code multidimensional information coding, coding/decoding method and device Download PDF

Info

Publication number
CN105976004B
CN105976004B CN201610260753.5A CN201610260753A CN105976004B CN 105976004 B CN105976004 B CN 105976004B CN 201610260753 A CN201610260753 A CN 201610260753A CN 105976004 B CN105976004 B CN 105976004B
Authority
CN
China
Prior art keywords
color
code
information
algorithm
decoding
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
CN201610260753.5A
Other languages
Chinese (zh)
Other versions
CN105976004A (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.)
South China Agricultural University
Original Assignee
South China Agricultural 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 South China Agricultural University filed Critical South China Agricultural University
Priority to CN201610260753.5A priority Critical patent/CN105976004B/en
Publication of CN105976004A publication Critical patent/CN105976004A/en
Application granted granted Critical
Publication of CN105976004B publication Critical patent/CN105976004B/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
    • 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
    • G06K19/06056Constructional details the marking comprising a further embedded marking, e.g. a 1D bar code with the black bars containing a smaller sized coding
    • 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
    • G06K19/0614Constructional details the marking being selective to wavelength, e.g. color barcode or barcodes only visible under UV or IR

Abstract

The invention discloses a kind of color 2 D code multidimensional information coding, coding/decoding method and devices, information comprising steps of being divided into multistage and being encrypted to every section using different Encryption Algorithm and/or key, each section of encrypted information split generation ordinary QR code image by coding method;Then, used polyalgorithm or key are carried out split and generates color addition template, finally color addition template is added in above-mentioned ordinary QR code image and obtains color 2 D code image.Coding/decoding method is comprising steps of distribute different solution code masks for different users, a solution code mask includes several decoded vectors;User covers solution code mask on color 2 D code image, and by the shape of image, color addition, affiliated decoding key is therefrom obtained using algorithm, the encryption information of corresponding several segments is decoded using this decoding key.The present invention makes a two dimensional code that can be read as different information by the user of different rights, widens the space encoder and application scenarios of two dimensional code.

Description

A kind of color 2 D code multidimensional information coding, coding/decoding method and device
Technical field
The present invention relates to two dimensional code research field, in particular to a kind of color 2 D code multidimensional information coding method, decoding Method and device thereof.
Background technique
Two dimensional code is the chequered with black and white figure being distributed in the two-dimensional direction according to certain rules with certain specific geometric figure Shape records data symbol information, and " 0 ", " 1 " ratio for constituting computer-internal logical foundations are dexterously utilized in code compilation The concept of spy's stream, indicates text numerical information using several geometrical bodies corresponding with binary system, is inputted by image Equipment or photoelectric scanning device automatically identifying and reading are to realize automatic processing of information.
It contains much information since two dimensional code has, the distinguishing features such as coding range is wide, decoding high reliablity and use cost are low, It has been widely used in every field.But, since two dimensional code is at low cost, the technology of coding and decoding discloses, personation is made The threshold of two dimensional code is also very low.
Therefore, it is necessary to a kind of effective anti-counterfeiting marks, on the one hand two dimensional code can be made to be increased by counterfeit difficulty, another party Face can expand the space encoder and application scenarios of two dimensional code.
Summary of the invention
The purpose of the present invention is to overcome the shortcomings of the existing technology and deficiency, provides a kind of color 2 D code multidimensional information volume Code, coding/decoding method and device, the present invention pass through the colour mixture principle after color addition, cleverly key are embedded into color layers, By distributing the solution code mask of different shape, color to different rights/role user, keep a two dimensional code different The user of permission is read as different information, has widened the space encoder and application scenarios of two dimensional code.
The purpose of the present invention is realized by the following technical solution: a kind of color 2 D code multidimensional information coding method, packet It includes step: information being divided into multistage and every section is encrypted using different Encryption Algorithm and/or key, it is encrypted each section Information split generates ordinary QR code image;Then, used polyalgorithm or key are carried out split and generates color addition Color addition template is finally added in above-mentioned ordinary QR code image and obtains color 2 D code image by template.
Specifically, comprising steps of
(1) information is divided into the part n;
(2) it is encrypted for each section information using different Encryption Algorithm and/or key, the Encryption Algorithm of every part Group becomes a vector, and the structure of vector is<algorithm, and key parameter>, algorithm is the Encryption Algorithm that current portions information uses Label, key parameter is the key parameter in used Encryption Algorithm;Various pieces information pair is obtained according to above-mentioned Encryption Algorithm The ciphertext answered;
(3) split is carried out to the ciphertext of above-mentioned various pieces, the information after obtaining split;
(4) information after split is generated into ordinary QR code image using two dimensional code generating algorithm;
(5) vector of each section Encryption Algorithm composition in the step (2) is indicated using numeralization, is encrypted Sequence;
(6) template coding and decoding table is covered according to the two dimensional code color of predefined, each adds by step (5) obtains Close sequence is converted to a color overlay area data, and all colours overlay area data carry out split and obtain color addition template; According to color addition template, the corresponding decoded vector in each part is generated, decoded vector is used in decoding from color addition mould Corresponding ciphering sequence is restored in plate;
(7) the color addition template that step (6) obtains is covered on the ordinary QR code image that step (4) obtains, is obtained To the color 2 D code image comprising multidimensional encryption information.
Specifically, the Encryption Algorithm includes that symmetric encipherment algorithm, rivest, shamir, adelman and Hash are calculated in step (2) Method.
Preferably, in step (3), when carrying out split to the ciphertext of various pieces, including sequence split, on-fixed sequence are spelled It closes, random matching mode;During split, each section is separated by the list separator arranged.
Preferably, in step (4), two dimensional code generating algorithm is the two dimensional code generating algorithm of standard.
Preferably, in step (6), color overlay area data include the shape of overlay area quantity, each overlay area Color on shape and each overlay area;The two dimensional code covering template coding and decoding table of predefined refers in advance according to overlay area The coding and decoding table that the shape and overlay area color being likely to occur are established respectively defines each in shape coding decoding table The corresponding numerical value of kind shape defines the corresponding numerical value of each color;It includes quantity, shape that the decoded vector, which is one, With the figure layer of color data.
Preferably, in step (6), it includes < overlay area quantity that each color overlay area data, which corresponds to one, is respectively covered Cover area shape, color on each overlay area > vector, vector here can be regarded as the figure layer of image, between figure layer It is superimposed the mixing principle based on color, including additive process and subtractive process.
A kind of color 2 D code multidimensional information coding/decoding method, comprising steps of distributing different decodings for different users Template, a solution code mask includes several decoded vectors;User covers solution code mask on color 2 D code image, leads to Shape, the color addition for crossing image therefrom obtain affiliated decoding key, decode adding for corresponding several segments using this decoding key Confidential information.
Specifically, comprising steps of
(1) color 2 D code image is obtained, the color addition template of color 2 D code is therefrom isolated, user is distributed To solution code mask be added in color addition template, read the area data on image, area data includes region quantity, each Color in the shape in region and each region;
(2) for the area data read, according to the inverse process for generating color addition template method, from color addition mould Corresponding ciphering sequence is restored in plate;
(3) used Encryption Algorithm and counterpart keys parameter are found according to ciphering sequence;
(4) image in 2 D code is carried out binaryzation, removes colouring information, passes through corresponding with two dimensional code generating algorithm two It ties up code decoding algorithm and reads two-dimensional barcode information;
(5) two-dimensional barcode information of each part is decrypted respectively according to above-mentioned Encryption Algorithm and counterpart keys parameter.
Preferably, in the step (1), solution code mask is regarded as a figure layer, for color addition layer information figure layer and Decode template layer superposition, mixing principle of the superposition based on color between figure layer, including additive process and subtractive process.
A kind of color 2 D code multidimensional information code device, comprising:
Piecemeal module, for information to be divided into the part n;
Encrypting module, for being encrypted for each section information using different Encryption Algorithm and/or key, every part Encryption Algorithm group become a vector, the structure of vector is<algorithm, key parameter>, algorithm is what current portions information used The label of Encryption Algorithm, key parameter are the key parameter in used Encryption Algorithm;It is obtained according to above-mentioned Encryption Algorithm each The corresponding ciphertext of partial information;
Die section, the ciphertext for obtaining to above-mentioned encrypting module carry out split, the information after obtaining split;
Ordinary QR code generation module, for the information after split to be generated ordinary QR code using two dimensional code generating algorithm Image;
Ciphering sequence generation module, the vector for forming each section Encryption Algorithm is indicated using numeralization, is obtained Ciphering sequence;
Color addition template generation module, for covering template coding and decoding table according to the two dimensional code color of predefined, Each ciphering sequence that ciphering sequence generation module obtains is converted into a color overlay area data, all colours area of coverage Numeric field data carries out split and obtains color addition template;According to color addition template, the corresponding decoded vector in each part is generated, is solved Code vector is used to restore corresponding ciphering sequence from color addition template in decoding;
Color 2 D code generation module included for color addition template to be covered ordinary QR code image The color 2 D code image of multidimensional encryption information.
A kind of color 2 D code multidimensional information decoding apparatus, comprising:
It solves code mask and obtains module, for obtaining the solution code mask of active user;
Color addition information reading module, for isolating the color addition of color 2 D code from color 2 D code image Template;
Color addition decoder module, the solution code mask for user to be distributed to are added in color addition template, read Take the area data on image, area data include region quantity, each region shape and each region on color;
Encryption information module is obtained, for the area data for reading, according to generation color addition template method Inverse process restores corresponding ciphering sequence from color addition template, according to ciphering sequence find used in Encryption Algorithm and Counterpart keys parameter;
Ordinary QR code read module, for removing colouring information for color 2 D code image binaryzation, by with two dimension The corresponding two dimensional code decoding algorithm of code generating algorithm reads two-dimensional barcode information;
Deciphering module, for being solved according to the corresponding Encryption Algorithm in each part and key parameter to two-dimensional barcode information It is close.
The present invention has the following advantages and effects with respect to the prior art:
1, by the way that information is divided into multiple portions, each part is encrypted the present invention using different Encryption Algorithm/keys, It ties up using cipher key related information as color, is added in two dimensional code according to color mixing principle.To different users with figure layer mould The mode of plate distributes different decoding keys, and user reads identical two dimensional code using different decoding Mapping templates, can obtain Different data.
2, the present invention allows a two dimensional code to be read as different information by the user of different rights, has widened two dimensional code Space encoder and application scenarios.
Detailed description of the invention
Fig. 1 is the schematic diagram of color 2 D code multidimensional information code device described in the present embodiment.
Fig. 2 is the schematic diagram of color 2 D code multidimensional information decoding apparatus described in the present embodiment.
Specific embodiment
Present invention will now be described in further detail with reference to the embodiments and the accompanying drawings, but embodiments of the present invention are unlimited In this.
Embodiment 1
As shown in Figure 1, a kind of color 2 D code multidimensional information code device of the present embodiment, including piecemeal module, encryption mould Block, die section, ordinary QR code generation module, ciphering sequence generation module, color addition template generation module, color 2 D Code generation module.Corresponding, decoding apparatus includes that solution code mask obtains module, color addition information reading module, color addition Decoder module obtains encryption information module, ordinary QR code read module, deciphering module, for corresponding according to each part Two-dimensional barcode information is decrypted in Encryption Algorithm and key parameter.The function of modules referring to Summary explanation. Lower mask body is illustrated coding method and coding/decoding method.
A kind of color 2 D code multidimensional information coding method of the present embodiment, comprising the following steps:
(1) it is the part n information Msg points, is denoted as Msg1、Msg2……Msgn, i.e.,Letter described here Breath can be any information, may exist association between each section, can also be mutually indepedent.
(2) for the information of each section in step (1), (identical encryption also can be used using different Encryption Algorithm Algorithm but different keys) it is encrypted, Algorithm is denoted as the Encryption Algorithm of every partn, i.e., wherein every Partial encryption is calculated Method AlgorithmnIn composition are as follows:<algorithm, key parameter>, the label of algorithm Encryption Algorithm thus, key parameter is is made With the key parameter in Encryption Algorithm.If information each section uses identical Encryption Algorithm, used key parameter can not It is identical.For each section information using different Encryption Algorithm encryption after, obtain corresponding ciphertext Msg1'、Msg2'…… Msgn', it converts as follows: Algorithmn(Msgn)=Msg'n
In practical application, Encryption Algorithm may include symmetric encipherment algorithm, rivest, shamir, adelman and hash algorithm, such as The various Encryption Algorithm such as DES, RSA, elliptic curve, MD5.The key parameter, such as the single encryption key ginseng in DES Public and private key parameter etc. in number, RSA, the number of parameters depending on algorithm can be zero.
(3) after passing through corresponding Encryption Algorithm encryption for step (2) each section information, obtained ciphertext Msg1'、 Msg2'……Msgn', split is carried out by certain method, finally obtains information Msg' after split.Method is denoted as Method, It is expressed as follows:
Here split algorithm, including sequence split (i.e. Msg'=Msg1'+Msg2'+……+Msgn', every part according to Sequence split), on-fixed sequence split (i.e. each section pass through the split of on-fixed sequence), random matching (i.e. each section by with The split of machine sequence) etc., split is carried out to information after encryption, is not limited to the above combination method.During split, each section passes through The list separator of agreement is separated.
(4) image in 2 D code is generated by two dimensional code generating algorithm for split information Msg' obtained in step (3).This In two dimensional code generating algorithm can for standard two dimensional code generating algorithm (such as two dimensional code PDF417, Datamatrix, The generating algorithm of Maxicode, QR Code, Code 49, Code 16K, Vericode, Ultracode).
(5) it is indicated for Encryption Algorithm used in each section in (2) using numeralization, is denoted as ω, i.e. Keyn= ω(Algorithmn), obtain Key1、Key2……KeynSequence.
(6) in image in 2 D code template, template coding and decoding table is covered according to the two dimensional code color of predefined and is generated Color overlay area data, color overlay area data include overlay area quantity, the shape of each overlay area and each area of coverage Color on domain;The two dimensional code covering template coding and decoding table of predefined refers to the shape being likely to occur in advance according to overlay area The coding and decoding table that shape and overlay area color are established respectively defines each shape corresponding one in shape coding decoding table A numerical value defines the corresponding numerical value of each color, and together with overlay area quantity, foundation < overlay area quantity i is each to cover Region shape S, color C on each overlay area>vector, vector here can be regarded as the figure layer of image, and make<in,Sn, Cn> and KeynCorresponding relationship λ is established, is denoted as: Keyn=λ < in,Sn,Cn> stacks up the corresponding vector of each Key (i.e. Quantity, region and color are covered, n figure layer is amounted to), the color addition scheme Model of image in 2 D code is obtained, is denoted as:
After generating Model, the decoded vector < i' of each part is generated according to Modeln,S'n,C'n>, and make Keyn-1(Model ∪ < i'n,S'n,C'n>), that is, by generate color addition algorithm inverse process, Ke Yicong Corresponding Key is restored according to decoded vector in Modeln
It includes quantity, the figure layer of shape and color data that decoded vector specific manifestation, which is one,.Count n < overlay area number I, each overlay area shape S are measured, color C > vector on each overlay area can be considered n figure layer, the superposition between figure layer, i.e., respectively Mixing principle of the color mixing based on color between a figure layer, including additive process and subtractive process.
(7) on the image in 2 D code that the color addition template covering step (4) in step (6) is generated, packet is finally obtained The color 2 D code of the encryption information containing multidimensional.
Corresponding and above-mentioned coding method, a kind of color 2 D code multidimensional information coding/decoding method of the present embodiment, including it is following Step:
(1) color 2 D code image is obtained, the color addition Template Information Model reconciliation of color 2 D code is therefrom isolated Code vector < i'n,S'n,C'n> is added to the solution code mask that user is distributed in color addition template, reads on image Area data, area data include region quantity, each region shape and each region on color, area data, that is, Model ∪ < i'n,S'n,C'n>.
Decoded vector may be regarded as a figure layer, for color addition layer information figure layer and decoded vector map overlay, use The mixing principle of color, including additive process and subtractive process.
(2) from step (1), the area data read, Key is usedn-1(Model ∪ < i'n,S'n,C'n>) The Key of algorithm reduction corresponding partn
(3) from step (2), KeynAccording to Algorithmn-1(Keyn) table of comparisons, it is counter find used in plus Close algorithm and counterpart keys parameter.Encryption Algorithm, key used by answering Key value counter can be checked from agreement corresponding relationship ω Parameter, so that it is determined that unique corresponding decoding algorithm.
(4) image in 2 D code is carried out binaryzation, removes colouring information, passes through corresponding with two dimensional code generating algorithm two It ties up code decoding algorithm and reads two-dimensional barcode information.
Two dimensional code decoding algorithm in the step (4) be standard two dimensional code decoding algorithm (such as two dimensional code PDF417, Generation/decoding of Datamatrix, Maxicode, QR Code, Code 49, Code 16K, Vericode, Ultracode are calculated Method), specifying information can be decoded from image in 2 D code.
Two-value described here turns to the Binarization methods of standard, color image can be become black white image.
(5) based on Encryption Algorithm obtained in step (3) and counterpart keys parameter, for the letter in step (4) Breath is decrypted.Since former cipher-text information is that a variety of methods are put together, and are separated with agreement list separator, therefore only The information of corresponding encryption part can be decrypted by having correct decipherment algorithm, other encryption partial informations are calculated by incorrect decryption What method decrypted is all messy code.It only needs identified decryption to be decrypted for every segment information, result is to close Manage information is the matched encrypted characters string of institute.
(6) the step of using different decoded vectors, repeating (1)-(5), so that it may decrypt the information of different piece.
3 application scenarios are given below, the process of the above method is specifically described.
One, application scenarios 1
It encrypted, decrypted according to the above whole process.
Assuming that n=3, information A, B, C are information before encrypting, information is encrypted using des encryption algorithm, key difference It is a, b, c, information A ', B ', C ' after being encrypted use " | " connector to be spliced information after encryption, obtain character string A ' | B ' | C ' generates corresponding two dimensional code.
Assuming that overlay area quantity i=1, each overlay area shape S=image in 2 D code size, color on each overlay area C={ red, blue, green, pink (red+blue), light blue (blue+green), yellow (red+green), white (red+blue+green) }, color, which is employed herein, to be added Color method (Colored light mixing) principle.
Give color specific assignment, red=1, blue=2, green=3, pink=4, light blue=5, yellow=6, white=7.
Encryption Algorithm and color overlay area data corresponding relationship are established, not due to this example overlay area number and shape Become, therefore can be omitted, only establishes the corresponding relationship of Encryption Algorithm and color value, corresponding relationship is as follows:
<DES algorithm, key a>=1 (red)
<DES algorithm, key b>=3 (green)
<DES algorithm, key c>=6 (indigo plants)
It is corresponding, the color of each layer is pieced together, obtains white (red+green+yellow), therefore two dimensional code face generated Color is set to white and (since white is invisible, the color of former two dimensional code is adjusted in practical operation shallower gray scale, program reads face Think color for white when color).
Respectively to three people's first, second, third, distributes 3 decoding figure layers, be first-yellow respectively, second-is pink and propyl- is light blue.
Assuming that first takes yellow decoding figure layer, when he scans white two dimensional code, decoding algorithm is according to white=yellow+indigo plant Color, obtains decoded figure layer color as blue, is<DES algorithm by tabling look-up to obtain the encryption that it is used, and key c>, then The two dimensional code binaryzation of white passes through content in the reading of two dimensional code decoding algorithm: A ' | B ' | C ', use < DES algorithm, key c The corresponding decoding algorithm of > Encryption Algorithm is directed to A ', B ', C ' information respectively and is decrypted, and is decrypted correctly algorithm due to only using Reasonable character string can be just decoded, therefore first can be decrypted correctly out information C, other information A ', B ' cannot be properly decrypt.
Similarly, second can only see information B ', and third can only see information A '.
By this example, a two dimensional code can be generated, when being superimposed with different colours, distribute to different users different Figure layer is decoded, user can read different information.
Two, application scenarios 2
On the basis of application scenarios 1, image in 2 D code is divided into sphere of movements for the elephants region, i.e. overlay area quantity i=4, is respectively covered Cover area shape S=square (image in 2 D code long/2, image in 2 D code is wide/and 2), other parameter settings and application scenarios 1 one Sample.
In each layer split, it is assumed that from top to bottom, from left to right totally 4 regions, then each region can be in sphere of movements for the elephants region It is allocated to a user and places key figure layer, user places solution code mask in this area to obtain the related letter of decryption Breath.
Three, application scenarios 3
In this scene, information split, information encryption flow are simplified, only uses two dimensional code color covering template and decoding Mapping template carries out Information hiding, reduction.
A string of URL character string informations, such as: " http://test.com/u/ " generates ordinary QR code.
Assuming that overlay area quantity i=1, each overlay area shape S=image in 2 D code size, color on each overlay area C={ red, blue, green, pink (red+blue), light blue (blue+green), yellow (red+green), white (red+blue+green) }, color, which is employed herein, to be added Color method (Colored light mixing) principle.
Give color specific assignment, red=1, blue=2, green=3, pink=4, light blue=5, yellow=6, white=7.
Color overlay area data corresponding relationship is established, it, can be with since this example overlay area number and shape are constant It omits.
Two dimensional code color generated is set to white (since white is invisible, the face of former two dimensional code in practical operation Tone is shallower gray scale, and program thinks color for white when reading color).
Respectively to three people's first, second, third, distributes 3 decoding figure layers, be first-yellow respectively, second-is pink and propyl- is light blue.
Assuming that first takes yellow decoding figure layer, when he scans white two dimensional code, decoding algorithm is according to white=yellow+indigo plant Color obtains decoded figure layer color as blue (value 2), then the result of final program processing is the URL character string that first is read Information are as follows: " http://test.com/u/2 ", such first can jump directly in the network address that parameter is 2.Similarly, second and Third decodes to obtain corresponding color parameter also by figure layer color, jumps in different network address.
The above embodiment is a preferred embodiment of the present invention, but embodiments of the present invention are not by above-described embodiment Limitation, other any changes, modifications, substitutions, combinations, simplifications made without departing from the spirit and principles of the present invention, It should be equivalent substitute mode, be included within the scope of the present invention.

Claims (8)

1. a kind of color 2 D code multidimensional information coding method, which is characterized in that comprising steps of
(1) information is divided into the part n;
(2) it is encrypted for each section information using different Encryption Algorithm and/or key, the Encryption Algorithm composition of every part For a vector, the structure of vector is<algorithm, key parameter>, algorithm is the mark for the Encryption Algorithm that current portions information uses Note, key parameter is the key parameter in used Encryption Algorithm;It is corresponding that various pieces information is obtained according to above-mentioned Encryption Algorithm Ciphertext;
(3) split is carried out to the corresponding ciphertext of above-mentioned various pieces information, the information after obtaining split;
(4) information after split is generated into ordinary QR code image using two dimensional code generating algorithm;
(5) vector of each section Encryption Algorithm composition in the step (2) is indicated using numeralization, obtains encryption sequence Column;
(6) template coding and decoding table is covered according to the two dimensional code color of predefined, each encryption sequence that step (5) is obtained Column are converted to a color overlay area data, and all colours overlay area data carry out split and obtain color addition template;According to Color addition template, generates the corresponding decoded vector in each part, and decoded vector is used in decoding from color addition template Restore corresponding ciphering sequence;
(7) the color addition template that step (6) obtains is covered on the ordinary QR code image that step (4) obtains, is wrapped The color 2 D code image of the encryption information containing multidimensional.
2. color 2 D code multidimensional information coding method according to claim 1, which is characterized in that
In step (2), the Encryption Algorithm is symmetric encipherment algorithm perhaps rivest, shamir, adelman or hash algorithm;
It is sequence split or on-fixed sequence split, Huo Zhesui when carrying out split to the ciphertext of various pieces in step (3) Machine splitting mode;During split, each section is separated by the list separator arranged;
In step (4), two dimensional code generating algorithm is the two dimensional code generating algorithm of standard.
3. color 2 D code multidimensional information coding method according to claim 1, which is characterized in that described in step (6) Color overlay area data include overlay area quantity, the color in the shape and each overlay area of each overlay area;It is fixed in advance The two dimensional code covering template coding and decoding table of justice refers to the shape being likely to occur in advance according to overlay area and overlay area color The coding and decoding table established respectively defines the corresponding numerical value of each shape, defines each in shape coding decoding table Color corresponds to a numerical value;It includes quantity, the figure layer of shape and color data that the decoded vector, which is one,.
4. color 2 D code multidimensional information coding method according to claim 3, which is characterized in that each in step (6) It includes<overlay area quantity that a color overlay area data, which correspond to one, each overlay area shape, and color on each overlay area> Vector, vector here can be regarded as the figure layer of image, mixing principle of the superposition based on color between figure layer, including add Color method and subtractive process.
5. a kind of color 2 D code corresponding to any one of the claim 1-4 color 2 D code multidimensional information coding method is more Tie up information decoding method, which is characterized in that comprising steps of
(1) color 2 D code image is obtained, the color addition template of color 2 D code is therefrom isolated, user is distributed to Solution code mask is added in color addition template, reads the area data on image, area data includes region quantity, each region Shape and each region on color;
(2) for the area data read, according to the inverse process for generating color addition template method, from color addition template Restore corresponding ciphering sequence;
(3) used Encryption Algorithm and counterpart keys parameter are found according to ciphering sequence;
(4) image in 2 D code is carried out binaryzation, removes colouring information, passes through two dimensional code corresponding with two dimensional code generating algorithm Decoding algorithm reads two-dimensional barcode information;
(5) two-dimensional barcode information of each part is decrypted respectively according to above-mentioned Encryption Algorithm and counterpart keys parameter.
6. color 2 D code multidimensional information coding/decoding method according to claim 5, which is characterized in that in the step (1), Solution code mask is regarded as a figure layer, conciliates code mask map overlay for color addition layer information figure layer, it is folded between figure layer Add the mixing principle based on color, including additive process and subtractive process.
7. a kind of color 2 D code for realizing any one of the claim 1-4 color 2 D code multidimensional information coding method Multidimensional information code device characterized by comprising
Piecemeal module, for information to be divided into the part n;
Encrypting module, for being encrypted for each section information using different Encryption Algorithm and/or key, every part adds Close algorithm groups become a vector, and the structure of vector is<algorithm, and key parameter>, algorithm is the encryption that current portions information uses The label of algorithm, key parameter are the key parameter in used Encryption Algorithm;Various pieces are obtained according to above-mentioned Encryption Algorithm The corresponding ciphertext of information;
Die section, the ciphertext for obtaining to above-mentioned encrypting module carry out split, the information after obtaining split;
Ordinary QR code generation module, for the information after split to be generated ordinary QR code figure using two dimensional code generating algorithm Picture;
Ciphering sequence generation module, for by Encryption Algorithm<algorithm used in each section, key parameter>use to quantize It indicates, obtains ciphering sequence;
Color addition template generation module will add for covering template coding and decoding table according to the two dimensional code color of predefined Each ciphering sequence that close sequence generating module obtains is converted to a color overlay area data, all colours overlay area number Color addition template is obtained according to split is carried out;According to color addition template, generate the corresponding decoded vector in each part, decode to Amount from color addition template for restoring corresponding ciphering sequence in decoding;
Color 2 D code generation module is obtained for color addition template to be covered ordinary QR code image comprising multidimensional The color 2 D code image of encryption information.
8. a kind of color 2 D code for realizing any one of claim 5, the 6 color 2 D code multidimensional information coding/decoding method Multidimensional information decoding apparatus characterized by comprising
It solves code mask and obtains module, for obtaining the solution code mask of active user;
Color addition information reading module, for isolating the color addition mould of color 2 D code from color 2 D code image Plate;
Color addition decoder module, the solution code mask for user to be distributed to are added in color addition template, read figure As upper area data, area data include region quantity, each region shape and each region on color;
Encryption information module is obtained, for the area data for reading, according to the inverse mistake for generating color addition template method Journey restores corresponding ciphering sequence from color addition template, finds used Encryption Algorithm and correspondence according to ciphering sequence Key parameter;
Ordinary QR code read module, for removing colouring information for color 2 D code image binaryzation, by raw with two dimensional code Two-dimensional barcode information is read at the corresponding two dimensional code decoding algorithm of algorithm;
Deciphering module, for two-dimensional barcode information to be decrypted according to the corresponding Encryption Algorithm in each part and key parameter.
CN201610260753.5A 2016-04-25 2016-04-25 A kind of color 2 D code multidimensional information coding, coding/decoding method and device Active CN105976004B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610260753.5A CN105976004B (en) 2016-04-25 2016-04-25 A kind of color 2 D code multidimensional information coding, coding/decoding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610260753.5A CN105976004B (en) 2016-04-25 2016-04-25 A kind of color 2 D code multidimensional information coding, coding/decoding method and device

Publications (2)

Publication Number Publication Date
CN105976004A CN105976004A (en) 2016-09-28
CN105976004B true CN105976004B (en) 2019-05-07

Family

ID=56994768

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610260753.5A Active CN105976004B (en) 2016-04-25 2016-04-25 A kind of color 2 D code multidimensional information coding, coding/decoding method and device

Country Status (1)

Country Link
CN (1) CN105976004B (en)

Families Citing this family (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106778995B (en) * 2016-11-25 2020-02-28 北京矩石科技有限公司 Artistic two-dimensional code generation method and device fused with image
CN106875323B (en) * 2017-01-18 2020-08-18 中国人民武装警察部队工程大学 Information hiding method and device based on image encryption
CN107423799B (en) * 2017-08-13 2020-06-05 上海平欣电子科技有限公司 Two-dimensional code generating system
CN107609622B (en) * 2017-08-28 2021-03-02 深圳市金天速科技有限公司 Encryption method and system based on multi-code unification
CN108416405B (en) * 2018-03-12 2021-07-13 北京知道创宇信息技术股份有限公司 Two-dimensional code verification method and system
CN108960385A (en) * 2018-06-29 2018-12-07 苏州酷豆物联科技有限公司 Two dimensional code generation and verification method and system based on the encryption of multiple code key
CN110941810A (en) * 2018-09-21 2020-03-31 杭州海康威视数字技术股份有限公司 Password resetting method and device, terminal equipment, server and storage medium
CN109389199B (en) * 2018-09-27 2022-02-01 张伟 Multi-dimensional code system and coding and decoding method
CN109379351B (en) * 2018-09-30 2021-04-27 武汉斗鱼网络科技有限公司 Two-dimensional code encryption method, storage medium, equipment and system
CN109583255A (en) * 2018-11-19 2019-04-05 深圳盈达信息科技有限公司 A kind of scanning means and its scan module
CN109784452A (en) * 2018-12-12 2019-05-21 平安科技(深圳)有限公司 Card card recognition methods and device based on color 2 D code
CN109977716A (en) * 2019-03-14 2019-07-05 北京龙贝世纪科技股份有限公司 A kind of data decoding method, terminal and storage medium
CN110022314B (en) * 2019-03-25 2021-07-27 浩云科技股份有限公司 Big data secure transmission method based on matrix two-dimensional code
CN110266683A (en) * 2019-06-18 2019-09-20 北京阿尔山区块链联盟科技有限公司 Digital asset sharing method, device and electronic equipment
CN111428532B (en) * 2020-03-17 2023-09-29 镇江市高等专科学校 Coding and decoding method capable of encrypting three-dimensional code
CN112529586B (en) * 2020-12-15 2023-07-28 深圳市快付通金融网络科技服务有限公司 Transaction information management method, device, equipment and storage medium
CN112580763A (en) * 2020-12-23 2021-03-30 慧鼎宏成(海南)科技有限公司 Novel two-dimensional code system
CN112819122A (en) * 2021-01-28 2021-05-18 清华大学 Two-dimensional code generation and analysis method and device
CN113868618B (en) * 2021-09-03 2022-04-26 浙江创建科技有限公司 Multi-code collaborative fusion and authentication system based on multiple two-dimensional code standards

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388076A (en) * 2007-09-12 2009-03-18 北京方维银通科技有限公司 Method and apparatus for generating two-dimension bar-code
CN102156894A (en) * 2011-04-07 2011-08-17 华南农业大学 Layered two-dimension code system and application method of layered two-dimension code system
CN102184380A (en) * 2011-05-10 2011-09-14 华南农业大学 Color-superposition two-dimension code system and application method thereof
CN102916804A (en) * 2012-08-28 2013-02-06 华南农业大学 Two-dimension code coding and decoding method and device based on local color verification
CN104268610A (en) * 2014-09-11 2015-01-07 重庆大学 Method for generating and reading graded QR code

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2404486A (en) * 2003-07-31 2005-02-02 Sony Uk Ltd Access control for digital storage medium content

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101388076A (en) * 2007-09-12 2009-03-18 北京方维银通科技有限公司 Method and apparatus for generating two-dimension bar-code
CN102156894A (en) * 2011-04-07 2011-08-17 华南农业大学 Layered two-dimension code system and application method of layered two-dimension code system
CN102184380A (en) * 2011-05-10 2011-09-14 华南农业大学 Color-superposition two-dimension code system and application method thereof
CN102916804A (en) * 2012-08-28 2013-02-06 华南农业大学 Two-dimension code coding and decoding method and device based on local color verification
CN104268610A (en) * 2014-09-11 2015-01-07 重庆大学 Method for generating and reading graded QR code

Also Published As

Publication number Publication date
CN105976004A (en) 2016-09-28

Similar Documents

Publication Publication Date Title
CN105976004B (en) A kind of color 2 D code multidimensional information coding, coding/decoding method and device
WO2018137602A1 (en) Method and apparatus for generating and reading composite two-dimensional code
CN102902997B (en) A kind of Quick Response Code hybrid coding, decoding device and method
CN103310255B (en) A kind of coding method of color character and its coding/decoding method
CN105825257B (en) Information hiding and hiding information extracting method and system based on two-dimensional bar code
CN107657579A (en) Image encryption method based on DNA encoding and chaos
Abdul et al. Biometric security through visual encryption for fog edge computing
CN102779263A (en) Credible two-dimensional code scheme based on public key infrastructure (PKI) and digital signature
US20140339312A1 (en) Progressive Barcode
CN104038761B (en) A kind of encrypted domain H.264/AVC video data hidden method based on the mapping of CABAC binary strings
CN106330976A (en) Information encryption and decryption method and device
CN104268610B (en) One kind classification QR code generating methods and read method
CN104376356A (en) Two-dimensional code generating method with encryption function
CN105976005A (en) Two-dimensional code encrypting method, two-dimensional code generating device and two-dimensional code scanning device
CN107944526B (en) Tamper-proof and copy-proof two-dimensional code anti-counterfeiting method
CN107086913A (en) A kind of color 2 D code encipher-decipher method under high-dimension chaotic system
CN107992923A (en) A kind of QR Quick Response Codes generation and the method read
CN107294964B (en) Information transmission method
CN107451948A (en) Image Encrypt and Decrypt method and system based on chaos and DNA dynamic plane computings
Thomas et al. Review on various visual cryptography schemes
CN106022187A (en) High-efficient O2O implementation method
CN106570548B (en) A kind of mixing two dimensional code based on the encryption of multi-level information
CN101409830B (en) Method and apparatus for judging DCT coefficient block similarity, and encrypting and deciphering image
CN112134687B (en) Information encryption and decryption method based on two-dimensional code
CN111242259B (en) Intelligent anti-counterfeiting code encoding and decoding method and system

Legal Events

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