Summary of the invention
For the weak point existed in the problems referred to above, the invention provides a kind of pattern that formed unique and with a kind of antifalsification label of mass data information, with generation method and generation system thereof.
For achieving the above object, the invention provides a kind of matrix point diagram, comprise anchor point part and data point part, described data point part comprises function digit part, data bit portion, School Affairs part and primitive character and extracts status sections;
Described function digit part comprise version number's monumented point position for representing version number, for represent numerical digit sparse Processing Algorithm type Map algorithm types monumented point position, for representing the density value monumented point position of valid data bit quantity, the block index mark point position for code figure quantity basic in representing matrix point diagram and the encryption algorithm type monumented point position for representing matrix point diagram cryptographic algorithm.
Above-mentioned matrix point diagram, wherein, also comprises the monumented point position of filling character for filling character in described function digit part.
The invention provides a kind of matrix dot map generalization method, comprise the following steps:
Step 1, storage allocation buffer memory Ap, and calculate the size of this memory cache Ap and the quantity of data point institute's occupy-place in memory cache Ap;
Step 2, utilize the result of following formula input in memory cache Ap needed for the quantity of filling character and character information:
P=(A-3)%4,
Wherein, P is the quantity of filling character;
Step 3, utilize following formula to distribute to deposit the quantity of valid data position in the content caching Tp at significant figure strong point:
Tn=A-14,
Wherein, Tn is valid data bit quantity;
Step 4, after padding data, filled data to be arranged in content caching Tp, and in multiple cipher mode, choose a kind of cipher mode the data after arrangement are encrypted;
Step 5, in content caching Tp arrangement after data bit verify, and the data bit obtained after this verification is added to content caching Tp arrange after data after;
Step 6, sparse process is carried out to the data bit of content caching Tp, to obtain a content caching Tp2 with data and new significant figure strong point;
Step 7, content caching Tp2 to be calculated, with draw can carry in this content caching Tp2 number of data bits, valid data position quantity and the quantity of filling character;
Fill in version number successively in step 8, memory cache Ap, fill character and quantity, the type of sparse Processing Algorithm, block call number, data in content caching Tp2 in the quantity of valid data position and content caching Tp2;
Step 9, be after binary data by the data transformations in memory cache Ap, it be implanted in the blank grid for implantation number strong point according to order from left to right and from top to bottom, to form a matrix point diagram in antifalsification label or antifalsification label.
Above-mentioned generation method, wherein, in step 1, comprises following sub-step:
Step 11, distribution one section of memory cache Ap, and utilize following formula to calculate the size of this memory cache Ap:
A=(dim-1)≠dim,
Wherein, A is the size of memory cache Ap, and dim is the size of dimension;
Step 12, following formula is utilized to calculate bit quantity shared by data point in memory cache Ap:
C=(A-3)/≠2,
Wherein, C bit quantity shared by data point.
Above-mentioned generation method, wherein, in step 2, the numerical value obtained after this formulae discovery, comprises following two kinds of situations,
Situation one:
As P=0, show can not to produce in function digit the monumented point position of filling character that needs are filled character;
Situation two:
When P ≠ 0, show to produce the fill character monumented point position identical with filled character quantity in function digit, now, needs are inserted in each fills character monumented point position numeral 0.
Above-mentioned generation method, wherein, in step S4, comprises following sub-step:
Step 41, utilize following formula to distribute to deposit the quantity of valid data position in the content caching Tp at significant figure strong point:
Tn=A-14,
Wherein, Tn is valid data bit quantity;
Step 42, utilize a kind of cryptographic algorithm of following formula stochastic generation:
Above-mentioned generation method, wherein, in step S6, comprises selectable low-density algorithm and high density algorithm:
Low-density algorithm is the 2to4 algorithm for 2bit data being converted to 4bit data, and mapping table is as follows:
High density algorithm is the 2to3 algorithm for 2bit data being converted to 3bit data, and mapping table is as follows
Above-mentioned generation method, wherein, in step S7, the number of data bits utilizing following formula to draw respectively can to carry in yard figure, the quantity of valid data position and the quantity of filling character,
Bits=(dim*(dim-1))–3;
DataBits23=Bits/3*2;
PaddingBits23=Bits%3;
DataBits24=Bits/4*2;
PaddingBits24=Bits%4;
Wherein, Bits represents the number of data bits that code figure can carry;
When DataBits23 represents use 2to3 algorithm, the quantity of denotable valid data position;
When PaddingBits23 represents use 2to3 algorithm, the quantity of filling character;
When DataBits24 represents use 2to4 algorithm, the quantity of denotable valid data position;
When PaddingBits24 represents use 2to4 algorithm, the quantity of filling character.
The invention provides a kind of matrix dot map generalization system, comprising:
Memory cache size computing module, the size of the memory cache arrived for utilizing following formula dispensed,
A=(dim-1)≠dim,
Wherein, A is the size of memory cache, and dim is the size of dimension;
Bit quantity computing module shared by data point, calculates bit quantity shared by data point in memory cache Ap for utilizing following formula:
C=(A-3)/4≠2,
Wherein, C bit quantity shared by data point;
To fill character number calculating section, for utilize the result of following formula input needed for the quantity of filling character and character information,
P=(A-3)%4,
Wherein, P is the quantity of filling character;
Valid data bit quantity computing module, for utilizing following formula to distribute the quantity depositing valid data position in content caching Tp,
Tn=A-14,
Wherein, Tn is valid data bit quantity;
Data arranging module, after padding data in content caching Tp, utilizes following formula to arrange filled data,
N=E%4+4,
Wherein, N represents permutation algorithm exponent number, and E represents cryptographic algorithm;
Data encryption module, for choosing a kind of cipher mode by multiple cipher mode, is encrypted the data after arrangement in content caching Tp;
Data bit correction verification module, for verifying the data bit of the data after arrangement in content caching Tp, and adds to after the data in the content caching of significant figure strong point after arrangement by the data bit obtained after this verification;
Sparse processing module, carries out sparse process with to the data bit in the data after arrangement in content caching Tp, to obtain a content caching Tp2 with data and new significant figure strong point;
COMPREHENSIVE CALCULATING module, for calculating content caching Tp2, with draw can carry in this content caching Tp2 number of data bits, valid data position quantity and the quantity of filling character;
Fill in module, for filling in version number in memory cache Ap successively, fill character and quantity, the type of sparse Processing Algorithm, block call number, data in content caching Tp2 in the quantity of valid data position and content caching Tp2;
Modular converter, for being binary data by the data transformations in memory cache Ap;
Data point implant module, for being implanted in binary data in the blank grid for implantation number strong point according to order from left to right and from top to bottom.
The present invention also provides a kind of antifalsification label including matrix point diagram, comprises the matrix point diagram group be made up of at least two matrix point diagrams, described matrix point diagram group comprise basis matrix point diagram, be arranged on the rotation matrix point diagram of its side;
Described basis matrix point diagram and institute's rotation matrix point diagram are all comprise anchor point part and data point part, and described data point part comprises function digit part, data bit portion, School Affairs part and primitive character and extracts status sections;
Described function digit part comprise version number's monumented point position for representing version number, for represent numerical digit sparse Processing Algorithm type Map algorithm types monumented point position, for representing the density value monumented point position of valid data bit quantity, the block index mark point position for code figure quantity basic in representing matrix point diagram and the encryption algorithm type monumented point position for representing matrix point diagram cryptographic algorithm.
Compared with prior art, the present invention has the following advantages:
1, the matrix point diagram in the present invention by algorithmic rule specifically defined after, thus it is unique and with the matrix point diagram of mass data information to form pattern;
2, in antifalsification label of the present invention, if the data volume defined is greater than the capacity of a matrix point diagram, can set according to the quantity of data volume to matrix point diagram, and can set the pattern of multiple matrix point diagram, thus increase the diversity of form;
3, because algorithmic rule used in the present invention has privacy and originality, ensure that the difficulty that matrix point diagram is decrypted, make matrix point diagram have anti-counterfeiting performance, can be applicable to anti-counterfeit field;
4, for generating this matrix dot map generalization method and generation system can form the matrix dot graph code system having magnanimity coded message;
Embodiment
As shown in Figures 1 and 2, the invention provides a kind of antifalsification label, the matrix point diagram that this antifalsification label is greater than 9 by a dimension forms, this matrix point diagram comprises anchor point part 1 and data point part 2, and data point part 2 comprises function digit part 21, data bit portion 22, School Affairs part 23 and primitive character and extracts status sections 24.
Wherein, function digit part 21 comprise version number's monumented point position for representing version number, for represent numerical digit sparse Processing Algorithm type Map algorithm types monumented point position, for represent valid data bit quantity density value monumented point position, for representing the block index mark point position of basic code figure quantity in antifalsification label and the encryption algorithm type monumented point position for representing matrix point diagram cryptographic algorithm.
As shown in Figure 3, the invention provides a kind of antifalsification label, the matrix point diagram that this antifalsification label is greater than 9 by a dimension forms, this matrix point diagram comprises anchor point part 1 and data point part 2, and data point part 2 comprises function digit part 21, data bit portion 22, School Affairs part 23 and primitive character and extracts status sections 24.
Wherein, function digit part 21 comprise version number's monumented point position for representing version number, for represent numerical digit sparse Processing Algorithm type Map algorithm types monumented point position, for represent valid data bit quantity density value monumented point position, for represent basic code figure quantity in antifalsification label block index mark point position, for the encryption algorithm type monumented point position of representing matrix point diagram cryptographic algorithm and the monumented point position of filling character for filling character.
As shown in Figure 4, the invention provides a kind of generation method of antifalsification label, comprise the following steps:
Step 1, storage allocation buffer memory Ap, and calculate the size of this memory cache Ap and the quantity of data point institute's occupy-place in memory cache Ap.
In step 1, following sub-step is comprised:
Step 11, distribution one section of memory cache Ap, and utilize following formula to calculate the size of this memory cache Ap:
A=(dim-1)≠dim,
Wherein, A is the size of memory cache Ap, and dim is the size of dimension;
Step 12, following formula is utilized to calculate bit quantity shared by data point in memory cache Ap:
C=(A-3)/≠2,
Wherein, C bit quantity shared by data point.
Step 2, utilize the result of following formula input in memory cache Ap needed for the quantity of filling character and character information:
P=(A-3)%4,
Wherein, P is the quantity of filling character.
In step 2, the numerical value obtained after this formulae discovery, comprises following two kinds of situations,
Situation one:
As P=0, show can not to produce in function digit the monumented point position of filling character that needs are filled character;
Situation two:
When P ≠ 0, show to produce the fill character monumented point position identical with filled character quantity in function digit, now, needs are inserted in each fills character monumented point position numeral 0.
Step 3, utilize following formula to distribute to deposit the quantity of valid data position in the content caching Tp at significant figure strong point:
Tn=A-14,
Wherein, Tn is valid data bit quantity.
Step 4, after padding data, filled data to be arranged in content caching Tp, and in multiple cipher mode, choose a kind of cipher mode the data after arrangement are encrypted.
Comprise following sub-step in step 4:
In step 41, following formula is utilized to distribute the quantity depositing valid data position in the content caching Tp at significant figure strong point:
Tn=A-14,
Wherein, Tn is valid data bit quantity.
The code of permutation algorithm is as follows:
Step 42, utilize a kind of cryptographic algorithm of following formula stochastic generation:
The function of cryptographic algorithm is as follows:
Step 5, in content caching Tp arrangement after data bit verify, and the data bit obtained after this verification is added to content caching Tp arrange after data after.
School Affairs is used for verifying data bit, and computing method are as shown in minor function:
Step 6, sparse process is carried out to the data bit of content caching Tp, to obtain a content caching Tp2 with data and new significant figure strong point.
In step s 6, selectable low-density algorithm and high density algorithm is comprised:
Low-density algorithm is the 2to4 algorithm for 2bit data being converted to 4bit data, and mapping table is as follows:
High density algorithm is the 2to3 algorithm for 2bit data being converted to 3bit data, and mapping table is as follows
Step 7, content caching Tp2 to be calculated, with draw can carry in this content caching Tp2 number of data bits, valid data position quantity and the quantity of filling character.
In the step s 7, the number of data bits utilizing following formula to draw respectively can to carry in yard figure, the quantity of valid data position and the quantity of filling character,
Bits=(dim*(dim-1))–3;
DataBits23=Bits/3*2;
PaddingBits23=Bits%3;
DataBits24=Bits/4*2;
PaddingBits24=Bits%4;
Wherein, Bits represents the number of data bits that code figure can carry;
When DataBits23 represents use 2to3 algorithm, the quantity of denotable valid data position;
When PaddingBits23 represents use 2to3 algorithm, the quantity of filling character;
When DataBits24 represents use 2to4 algorithm, the quantity of denotable valid data position;
When PaddingBits24 represents use 2to4 algorithm, the quantity of filling character.
Fill in version number successively in step 8, memory cache Ap, fill character and quantity, the type of sparse Processing Algorithm, block call number, data in content caching Tp2 in the quantity of valid data position and content caching Tp2;
Step 9, be after binary data by the data transformations in memory cache Ap, it be implanted in the blank grid for implantation number strong point according to order from left to right and from top to bottom, to form a matrix point diagram in antifalsification label or antifalsification label.
Wherein, blank grid is the blank grid of a 9x9.
As shown in Figure 5, the invention provides a kind of generation system of antifalsification label, comprising:
Memory cache size computing module, the size of the memory cache Ap arrived for utilizing following formula dispensed,
A=(dim-1)≠dim,
Wherein, A is the size of memory cache Ap, and dim is the size of dimension.
Bit quantity computing module shared by data point, calculates bit quantity shared by data point in memory cache Ap for utilizing following formula:
C=(A-3)/4≠2,
Wherein, C bit quantity shared by data point.
To fill character number calculating section, for utilize the result of following formula input needed for the quantity of filling character and character information,
P=(A-3)%4,
Wherein, P is the quantity of filling character.
The numerical value obtained after this formulae discovery, comprises following two kinds of situations,
Situation one:
As P=0, show can not to produce in function digit the monumented point position of filling character that needs are filled character;
Situation two:
When P ≠ 0, show to produce the fill character monumented point position identical with filled character quantity in function digit, now, needs are inserted in each fills character monumented point position numeral 0.
Valid data bit quantity computing module, for utilizing following formula to distribute the quantity depositing valid data position in content caching Tp,
Tn=A-14,
Wherein, Tn is valid data bit quantity.
Data arranging module, after padding data in content caching Tp, utilizes following formula to arrange filled data,
N=E%4+4,
Wherein, N represents permutation algorithm exponent number, and E represents cryptographic algorithm.
The code of data arranging module is as follows:
Data encryption module, for choosing a kind of cipher mode by multiple cipher mode, is encrypted the data after arrangement in content caching Tp.
Data encryption module utilizes a kind of cryptographic algorithm of following formula stochastic generation:
The function of data encryption module is as follows:
Data bit correction verification module, for verifying the data bit of the data after arrangement in content caching Tp, and adds to the data bit obtained after this verification after the data in the content caching of significant figure strong point after arrangement.
Data bit correction verification module is used for verifying data bit, and computing method are as shown in minor function:
Sparse processing module, carries out sparse process for the data bit in the data after arrangement in content caching Tp, to obtain a content caching Tp2 with data and new significant figure strong point.
Sparse processing module comprises selectable low-density computing module and high density computing module:
Low-density computing module is the 2to4 algorithm for 2bit data being converted to 4bit data, and mapping table is as follows:
High density computing module is the 2to3 algorithm for 2bit data being converted to 3bit data, and mapping table is as follows
COMPREHENSIVE CALCULATING module, for calculating content caching Tp2, with draw can carry in this content caching Tp2 number of data bits, valid data position quantity and the quantity of filling character.
The number of data bits that COMPREHENSIVE CALCULATING module utilizes following formula to draw respectively can to carry in yard figure, the quantity of valid data position and the quantity of filling character,
Bits=(dim*(dim-1))–3;
DataBits23=Bits/3*2;
PaddingBits23=Bits%3;
DataBits24=Bits/4*2;
PaddingBits24=Bits%4;
Wherein, Bits represents the number of data bits that code figure can carry;
When DataBits23 represents use 2to3 algorithm, the quantity of denotable valid data position;
When PaddingBits23 represents use 2to3 algorithm, the quantity of filling character;
When DataBits24 represents use 2to4 algorithm, the quantity of denotable valid data position;
When PaddingBits24 represents use 2to4 algorithm, the quantity of filling character.
Fill in module, for filling in version number in memory cache Ap successively, fill character and quantity, the type of sparse Processing Algorithm, block call number, data in content caching Tp2 in the quantity of valid data position and content caching Tp2;
Modular converter, for being binary data by the data transformations in memory cache Ap;
Data point implant module, for being implanted in binary data in the blank grid for implantation number strong point according to order from left to right and from top to bottom.
As shown in Figure 6, the invention provides a kind of antifalsification label, the matrix point diagram that this antifalsification label is greater than 9 by four dimensions forms.In four matrix point diagrams, point diagram based on label one, label two to label four is the matrix point diagram obtained after the basic point diagram of label one carries out Random-Rotation.
Be all comprise anchor point part and data point part in any one matrix point diagram of label one to label four, data point part comprises function digit part, data bit portion, School Affairs part and primitive character and extracts status sections.
Wherein, each matrix point diagram comprises anchor point part and data point part, and data point part comprises function digit part, data bit portion, School Affairs part and primitive character and extracts status sections.
Function digit part comprise version number's monumented point position for representing version number, for represent numerical digit sparse Processing Algorithm type Map algorithm types monumented point position, for represent valid data bit quantity density value monumented point position, for represent basic code figure quantity in antifalsification label block index mark point position, for represent antifalsification label cryptographic algorithm encryption algorithm type monumented point position and/or with the monumented point position of filling character for filling character.
Due to the antifalsification label in the present embodiment be by label one to label four totally four matrix dot matrix form, therefore, its memory data output is four times of the matrix point diagram in Fig. 1.
Only as described above, be only preferred embodiment of the present invention, such as professional who are familiar with this art.After understanding technological means of the present invention, natural energy, according to actual needs, is changed under the teachings of the present invention.Therefore all equal changes of doing according to the present patent application the scope of the claims and modification, once should still remain within the scope of the patent.