Invention content
Shortcoming present in regarding to the issue above, the present invention, which provides one kind, can form pattern uniquely and with a large amount of
A kind of antifalsification label of data information, with generation method and its generation system.
To achieve the above object, the present invention provides a kind of matrix dot map logo, including anchor point part and data point part,
The data point part includes that status sections are extracted in function bit position, data bit portion, verification and part with primitive character;
The function bit position includes for indicating that the version number of version number indicates point, for indicating the sparse place of data bit
It manages the Mp algorithm types marks point of algorithm types, the density value mark point for indicating valid data bit quantity, be used for table
Show the block index marker point of source code figure quantity in matrix dot map logo and is used for representing matrix point map logo Encryption Algorithm
Encryption algorithm type mark point.
Above-mentioned matrix dot map logo, wherein further include the filling word for filling character in the function bit position
Symbol mark point.
The present invention provides a kind of generation method of matrix dot map logo, includes the following steps:
Step 1, storage allocation cache Ap, and calculate the size of memory cache Ap with data point in memory cache Ap
The quantity of institute's occupy-place;
Step 2, inputted in memory cache Ap using the result of following formula needed for the quantity filled character and character information:
P=(A-3) %4,
Wherein, P is the quantity filled character;
Step 3, the quantity that valid data position in the content caching Tp for storing significant figure strong point is distributed using following formula:
Tn=A-14,
Wherein, Tn is valid data bit quantity;
Step 4 after filling data in content caching Tp, arranges the data filled, and in a variety of encryption sides
A kind of cipher mode is chosen in formula the data after arrangement are encrypted;
Step 5 verifies the data bit after being arranged in content caching Tp, and the data bit obtained after the verification is added
It is added to behind the data after content caching Tp arrangements;
Step 6 carries out sparse processing to the data bit of content caching Tp, and data and new significant figure are carried to obtain one
The content caching Tp2 at strong point;
Step 7 calculates content caching Tp2, with obtain the number of data bits that can be carried in content caching Tp2,
The quantity of valid data position and the quantity filled character;
Version number is filled in step 8, memory cache Ap successively, fill character and its quantity, the type of sparse Processing Algorithm,
The quantity of valid data position and the data in content caching Tp2 in block call number, content caching Tp2;
Step 9, after converting the data in memory cache Ap to binary data, by its according to from left to right and on to
Under sequence be implanted in the blank grid for implantation number strong point, to form a matrix in antifalsification label or antifalsification label
Point map logo.
Above-mentioned generation method, wherein in step 1, including following sub-step:
Step 11 distributes one section of memory cache Ap, and the size of memory cache Ap is calculated using following formula:
A=(dim-1) ≠ dim,
Wherein, A is the size of memory cache Ap, and dim is the size of dimension;
Step 12 calculates bit quantity shared by data point in memory cache Ap using following formula:
C=(A-3)/4 ≠ 2,
Wherein, C is bit quantity shared by data point.
Above-mentioned generation method, wherein in step 2, the numerical value obtained after formula calculating, including following two feelings
Condition,
Situation one:
As P=0, show not will produce the mark point of filling character for needing to fill character in function digit;
Situation two:
As P ≠ 0, show the identical index point of filling character of the quantity that will produce with filled character in function digit
Position, at this time, it would be desirable to insert number 0 in each fills character mark point.
Above-mentioned generation method, wherein in step S4, including following sub-step:
Step 41, the quantity that valid data position in the content caching Tp for storing significant figure strong point is distributed using following formula:
Tn=A-14,
Wherein, Tn is valid data bit quantity;
Step 42 generates a kind of Encryption Algorithm using following formula at random:
Above-mentioned generation method, wherein in step S6, including selectable low-density algorithm and high density algorithm:
Low-density algorithm is for the 2to4 algorithms 2bit data conversions at 4bit data, and mapping table is as follows:
High density algorithm is for the 2to3 algorithms 2bit data conversions at 3bit data, and mapping table is as follows
Above-mentioned generation method, wherein in step S7, obtain the data bits that can be carried in yard figure respectively using following formula
Amount, the quantity of valid data position and the quantity filled character,
Bits=(dim* (dim-1)) -3;
DataBits23=Bits/3*2;
PaddingBits23=Bits%3;
DataBits24=Bits/4*2;
PaddingBits24=Bits%4;
Wherein, Bits indicates the number of data bits that code figure can carry;
When DataBits23 is indicated using 2to3 algorithms, the quantity of denotable valid data position;
When PaddingBits23 is indicated using 2to3 algorithms, the quantity filled character;
When DataBits24 is indicated using 2to4 algorithms, the quantity of denotable valid data position;
When PaddingBits24 is indicated using 2to4 algorithms, the quantity filled character.
The present invention provides a kind of generation system of matrix dot map logo, including:
Memory cache size computing module, the size for calculating the memory cache being assigned to using following formula,
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, for calculating digit shared by data point in memory cache Ap using following formula
Amount:
C=(A-3)/4 ≠ 2,
Wherein, C is bit quantity shared by data point;
It fills character number calculating section, the quantity and character for filling character needed for the result input using following formula are believed
Breath,
P=(A-3) %4,
Wherein, P is the quantity filled character;
Valid data bit quantity computing module, for the number using valid data position in following formula distribution storage content caching Tp
Amount,
Tn=A-14,
Wherein, Tn is valid data bit quantity;
Data arranging module carries out the data filled using following formula after filling data in content caching Tp
Arrangement,
N=E%4+4,
Wherein, N indicates that permutation algorithm exponent number, E indicate Encryption Algorithm;
Data encryption module, for by choosing a kind of cipher mode in a variety of cipher modes, to being arranged in content caching Tp
Data afterwards are encrypted;
Data bit correction verification module is verified for the data bit to the data after being arranged in content caching Tp, and should
The data bit obtained after verification is added to behind the data after being arranged in the content caching of significant figure strong point;
Sparse processing module, with to in content caching Tp arrange after data in data bit carry out sparse processing, with
Obtain a content caching Tp2 for carrying data and new significant figure strong point;
COMPREHENSIVE CALCULATING module can be carried with obtaining in content caching Tp2 for calculating content caching Tp2
Number of data bits, the quantity of valid data position and the quantity filled character;
Fill in module, for fill in version number successively in memory cache Ap, fill character and its quantity, sparse processing calculate
The quantity of valid data position and the data in content caching Tp2 in the type of method, block call number, content caching Tp2;
Conversion module, for converting the data in memory cache Ap to binary data;
Data point implant module is used for for binary data to be implanted according to sequence from left to right and from top to bottom
In the blank grid at implantation number strong point.
The present invention also provides it is a kind of include matrix dot map logo antifalsification label, including by least two matrix dot icons
Know constituted matrix dot map logo group, the matrix dot map logo group includes basis matrix point map logo and is arranged at it
The spin matrix point map logo of side;
The basis matrix point map logo and institute's spin matrix point map logo be include anchor point part and data point portion
Point, the data point part includes that status sections are extracted in function bit position, data bit portion, verification and part with primitive character;
The function bit position includes for indicating that the version number of version number indicates point, for indicating the sparse place of data bit
It manages the Mp algorithm types marks point of algorithm types, the density value mark point for indicating valid data bit quantity, be used for table
Show the block index marker point of source code figure quantity in matrix dot map logo and is used for representing matrix point map logo Encryption Algorithm
Encryption algorithm type mark point.
Compared with prior art, the present invention has the following advantages:
1, the matrix dot map logo in the present invention by algorithmic rule it is specifically defined after, to formed pattern it is unique and
Matrix dot map logo with mass data information;
2, in the antifalsification label of the present invention, if the data volume to be defined is more than the capacity of a matrix dot map logo,
The quantity of matrix dot map logo can be set according to data volume, and can be with the pattern to multiple matrix dot map logos
It is set, to increase the diversity of form;
3, since algorithmic rule used in the present invention has privacy and originality, it ensure that matrix dot map logo is broken
The difficulty translated makes matrix dot map logo have anti-counterfeiting performance, can be applied to anti-counterfeit field;
4, possess magnanimity coding information for generating the generation method of the matrix dot map logo and can be formed with generation system
Matrix dot map logo coding scheme;
Specific implementation mode
As shown in Figures 1 and 2, the present invention provides a kind of antifalsification label, which is more than 9 matrix by a dimension
Point map logo composition, the matrix dot map logo include anchor point part 1 and data point part 2, and data point part 2 includes function
Status sections 24 are extracted in bit position 21, data bit portion 22, verification and part 23 with primitive character.
Wherein, function bit position 21 includes for indicating that the version number of version number indicates point, for indicating that data bit is dilute
It dredges the Mp algorithm types marks point of Processing Algorithm type, the density value mark point for indicating valid data bit quantity, use
In indicate the block index marker point of source code figure quantity in antifalsification label with for representing matrix point map logo Encryption Algorithm
Encryption algorithm type mark point.
As shown in figure 3, the present invention provides a kind of antifalsification label, which is more than 9 matrix point diagram by a dimension
Mark composition, the matrix dot map logo include anchor point part 1 and data point part 2, and data point part 2 includes function digit portion
21, data bit portion 22, verification and part 23 is divided to extract status sections 24 with primitive character.
Wherein, function bit position 21 includes for indicating that the version number of version number indicates point, for indicating that data bit is dilute
It dredges the Mp algorithm types marks point of Processing Algorithm type, the density value mark point for indicating valid data bit quantity, use
In indicate source code figure quantity in antifalsification label block index marker point, for representing matrix point map logo Encryption Algorithm plus
Close algorithm types mark point and the mark point of filling character for filling character.
As shown in figure 4, the present invention provides a kind of generation method of antifalsification label, include the following steps:
Step 1, storage allocation cache Ap, and calculate the size of memory cache Ap with data point in memory cache Ap
The quantity of institute's occupy-place.
In step 1, including following sub-step:
Step 11 distributes one section of memory cache Ap, and the size of memory cache Ap is calculated using following formula:
A=(dim-1) ≠ dim,
Wherein, A is the size of memory cache Ap, and dim is the size of dimension;
Step 12 calculates bit quantity shared by data point in memory cache Ap using following formula:
C=(A-3)/4 ≠ 2,
Wherein, C is bit quantity shared by data point.
Step 2, inputted in memory cache Ap using the result of following formula needed for the quantity filled character and character information:
P=(A-3) %4,
Wherein, P is the quantity filled character.
In step 2, the numerical value obtained after formula calculating, including following two situations,
Situation one:
As P=0, show not will produce the mark point of filling character for needing to fill character in function digit;
Situation two:
As P ≠ 0, show the identical index point of filling character of the quantity that will produce with filled character in function digit
Position, at this time, it would be desirable to insert number 0 in each fills character mark point.
Step 3, the quantity that valid data position in the content caching Tp for storing significant figure strong point is distributed using following formula:
Tn=A-14,
Wherein, Tn is valid data bit quantity.
Step 4 after filling data in content caching Tp, arranges the data filled, and in a variety of encryption sides
A kind of cipher mode is chosen in formula the data after arrangement are encrypted.
Include following sub-step in step 4:
The quantity of valid data position in step 41, using the content caching Tp at following formula distribution storage significant figure strong point:
Tn=A-14,
Wherein, Tn is valid data bit quantity.
The code of permutation algorithm is as follows:
Step 42 generates a kind of Encryption Algorithm using following formula at random:
The function of Encryption Algorithm is as follows:
Step 5 verifies the data bit after being arranged in content caching Tp, and the data bit obtained after the verification is added
It is added to behind the data after content caching Tp arrangements.
It verifies and for being verified to data bit, computational methods is as shown in minor function:
Step 6 carries out sparse processing to the data bit of content caching Tp, and data and new significant figure are carried to obtain one
The content caching Tp2 at strong point.
In step s 6, including selectable low-density algorithm and high density algorithm:
Low-density algorithm is for the 2to4 algorithms 2bit data conversions at 4bit data, and mapping table is as follows:
High density algorithm is for the 2to3 algorithms 2bit data conversions at 3bit data, and mapping table is as follows
Step 7 calculates content caching Tp2, with obtain the number of data bits that can be carried in content caching Tp2,
The quantity of valid data position and the quantity filled character.
In the step s 7, the number of data bits that can be carried in yard figure, the quantity of valid data position are obtained respectively using following formula
With the quantity filled character,
Bits=(dim* (dim-1)) -3;
DataBits23=Bits/3*2;
PaddingBits23=Bits%3;
DataBits24=Bits/4*2;
PaddingBits24=Bits%4;
Wherein, Bits indicates the number of data bits that code figure can carry;
When DataBits23 is indicated using 2to3 algorithms, the quantity of denotable valid data position;
When PaddingBits23 is indicated using 2to3 algorithms, the quantity filled character;
When DataBits24 is indicated using 2to4 algorithms, the quantity of denotable valid data position;
When PaddingBits24 is indicated using 2to4 algorithms, the quantity filled character.
Version number is filled in step 8, memory cache Ap successively, fill character and its quantity, the type of sparse Processing Algorithm,
The quantity of valid data position and the data in content caching Tp2 in block call number, content caching Tp2;
Step 9, after converting the data in memory cache Ap to binary data, by its according to from left to right and on to
Under sequence be implanted in the blank grid for implantation number strong point, to form a matrix in antifalsification label or antifalsification label
Point map logo.
Wherein, blank grid is the blank grid of a 9x9.
As shown in figure 5, the present invention provides a kind of generation system of antifalsification label, including:
Memory cache size computing module, the size for calculating the memory cache Ap being assigned to using following formula,
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, for calculating digit shared by data point in memory cache Ap using following formula
Amount:
C=(A-3)/4 ≠ 2,
Wherein, C is bit quantity shared by data point.
It fills character number calculating section, the quantity and character for filling character needed for the result input using following formula are believed
Breath,
P=(A-3) %4,
Wherein, P is the quantity filled character.
The numerical value obtained after formula calculating, including following two situations,
Situation one:
As P=0, show not will produce the mark point of filling character for needing to fill character in function digit;
Situation two:
As P ≠ 0, show the identical index point of filling character of the quantity that will produce with filled character in function digit
Position, at this time, it would be desirable to insert number 0 in each fills character mark point.
Valid data bit quantity computing module, for the number using valid data position in following formula distribution storage content caching Tp
Amount,
Tn=A-14,
Wherein, Tn is valid data bit quantity.
Data arranging module carries out the data filled using following formula after filling data in content caching Tp
Arrangement,
N=E%4+4,
Wherein, N indicates that permutation algorithm exponent number, E indicate Encryption Algorithm.
The code of data arranging module is as follows:
Data encryption module, for by choosing a kind of cipher mode in a variety of cipher modes, to being arranged in content caching Tp
Data afterwards are encrypted.
Data encryption module generates a kind of Encryption Algorithm at random using following formula:
The function of data encryption module is as follows:
Data bit correction verification module is verified for the data bit to the data after being arranged in content caching Tp, and should
The data bit obtained after verification is added to behind the data after being arranged in the content caching of significant figure strong point.
Data bit correction verification module is for verifying data bit, and computational methods are as shown in minor function:
Sparse processing module carries out sparse processing for the data bit in the data after being arranged in content caching Tp, with
The content caching Tp2 for carrying data and new significant figure strong point to one.
Sparse processing module includes selectable low-density computing module and high density computing module:
Low-density computing module is for the 2to4 algorithms 2bit data conversions at 4bit data, and mapping table is as follows:
High density computing module is for the 2to3 algorithms 2bit data conversions at 3bit data, and mapping table is as follows
COMPREHENSIVE CALCULATING module can be carried with obtaining in content caching Tp2 for calculating content caching Tp2
Number of data bits, the quantity of valid data position and the quantity filled character.
COMPREHENSIVE CALCULATING module obtains the number of data bits that can be carried in yard figure, the quantity of valid data position using following formula respectively
With the quantity filled character,
Bits=(dim* (dim-1)) -3;
DataBits23=Bits/3*2;
PaddingBits23=Bits%3;
DataBits24=Bits/4*2;
PaddingBits24=Bits%4;
Wherein, Bits indicates the number of data bits that code figure can carry;
When DataBits23 is indicated using 2to3 algorithms, the quantity of denotable valid data position;
When PaddingBits23 is indicated using 2to3 algorithms, the quantity filled character;
When DataBits24 is indicated using 2to4 algorithms, the quantity of denotable valid data position;
When PaddingBits24 is indicated using 2to4 algorithms, the quantity filled character.
Fill in module, for fill in version number successively in memory cache Ap, fill character and its quantity, sparse processing calculate
The quantity of valid data position and the data in content caching Tp2 in the type of method, block call number, content caching Tp2;
Conversion module, for converting the data in memory cache Ap to binary data;
Data point implant module is used for for binary data to be implanted according to sequence from left to right and from top to bottom
In the blank grid at implantation number strong point.
As shown in fig. 6, the present invention provides a kind of antifalsification label, which is more than 9 matrix point diagram by four dimensions
Mark composition.In four matrix dot map logos, label one is basic point diagram, and label two to label four is the basic point of label one
Figure carries out the matrix dot map logo obtained after Random-Rotation.
It includes anchor point part and data point portion to be in any one matrix dot map logo of label one to label four
Point, data point part includes that status sections are extracted in function bit position, data bit portion, verification and part with primitive character.
Wherein, each matrix dot map logo includes anchor point part and data point part, and data point part includes work(
It can bit position, data bit portion, verification and part and primitive character extraction status sections.
Function bit position includes for indicating that the version number of version number indicates point, for indicating that the sparse processing of data bit is calculated
The Mp algorithm types marks point of method type, the density value mark point for indicating valid data bit quantity, for indicating anti-
The block index marker point of source code figure quantity, the encryption algorithm type mark for indicating antifalsification label Encryption Algorithm in pseudo label
Will point and/or with for fill character fill character mark point.
It is that totally four matrix dot matrix are constituted by label one to label four by antifalsification label in this present embodiment, therefore,
Data storage capacity is four times of the matrix dot map logo in Fig. 1.
Only as described above, only presently preferred embodiments of the present invention, professional who are familiar with this art such as.?
After the technological means for understanding the present invention, natural energy is changed under the teachings of the present invention according to actual needs.Therefore all
According to variation and modification on an equal basis made by scope of the present invention patent, once should still remain within the scope of the patent.