CN109861815A - The bootlegging channel modeling method and system of two dimensional code - Google Patents
The bootlegging channel modeling method and system of two dimensional code Download PDFInfo
- Publication number
- CN109861815A CN109861815A CN201910083186.4A CN201910083186A CN109861815A CN 109861815 A CN109861815 A CN 109861815A CN 201910083186 A CN201910083186 A CN 201910083186A CN 109861815 A CN109861815 A CN 109861815A
- Authority
- CN
- China
- Prior art keywords
- dimensional code
- information
- target
- coding
- authentication information
- 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.)
- Pending
Links
Landscapes
- Image Processing (AREA)
Abstract
The present disclosure describes a kind of bootlegging channel modeling methods of two dimensional code characterized by comprising obtains original two-dimensional code;Original two-dimensional code is printed and scanned, legal two dimensional code is obtained;Legal two dimensional code is alternately printed and scanned by preset times, target two dimensional code is obtained;Calculate mean value, variance and the form factor of target two dimensional code;And bootlegging channel model is established by Generalized Gauss function based on mean value, variance and form factor.According to the disclosure, the bootlegging channel for being closer to actual scene can be obtained, can be used for the optimization of anti-copying two dimensional code.
Description
Technical field
This disclosure relates to information technology field, and in particular to a kind of bootlegging channel modeling method of two dimensional code and be
System.
Background technique
Traditional two dimensional code is easy to be replicated by illegal user after printing.Currently, the copy prevention method of two dimensional code
Specifically include that (1) carrys out anti-copying using digital watermark technology;(2) special printed material or technique anti-copying are used;(3) make
With physical unclonable feature anti-copying;(4) anti-copying pattern anti-copying is used.
Although the above method can play the role of anti-copying to a certain extent, there is also apparent limitations: one
Aspect, which reduce the versatility of two dimensional code, specifically the above method reduces two dimensional code to the general of output and reading equipment
All over applicability, and on resisting bootlegging and general applicability problem, there are contradictions;On the other hand, reduction can not be fought to attack
It hits, specifically due to the blocky and disclosed coding structure of conventional two-dimensional code, the above method can not be resisted for structuring two
Tie up the image restoring attack of code;In another aspect, it needs additional online information etc., the specifically verification process of the above method
It can not be completed, be needed using auxiliary information on additional line, such as database on line based on the characteristics of image under line.
In order to preferably improve copy prevention method, need first to understand bootlegging channel.However in existing technology
Temporarily without a kind of bootlegging channel modeling method close to actual scene.
Summary of the invention
To solve the above-mentioned problems, the bootlegging channel for being closer to actual scene can be obtained by proposing one kind,
It can be used for the bootlegging channel modeling method and system of the two dimensional code of the optimization of anti-copying two dimensional code.
For this purpose, the first aspect of the disclosure provides a kind of bootlegging channel modeling method of two dimensional code, feature exists
In, comprising: obtain original two-dimensional code;The original two-dimensional code is printed and scanned, legal two dimensional code is obtained;To the conjunction
Method two dimensional code is alternately printed and is scanned by preset times, obtains target two dimensional code;Calculate the target two dimensional code mean value,
Variance and form factor;And it is established based on the mean value, the variance and the form factor by Generalized Gauss function non-
Method replication channels model.
In the disclosure, legal two dimensional code and target two dimensional code are obtained based on original two-dimensional code, and is based on target two dimensional code
Mean value, variance and form factor bootlegging channel model is established by Generalized Gauss function.Thereby, it is possible to obtain more adjunction
It is bordering on the bootlegging channel of actual scene, can be used for the optimization of anti-copying two dimensional code.
In the modeling method of the bootlegging channel of the two dimensional code involved in the disclosure, optionally, the form factor
γ is calculated by lower formula (I): γ=r-1(ρ) (I) wherein, ρ=σ2/E2[| X |],σ2Indicate variance,J indicates mesh
The total amount of two dimensional code sample is marked, μ indicates mean value, xiIndicate gray value.Thereby, it is possible to obtain form factor.
In the bootlegging channel modeling method of the two dimensional code involved in the disclosure, optionally, prepare raw information and
Authentication information is encoded the raw information by the first coding mode, obtains coding raw information, passes through the second coding
Mode encodes the authentication information, obtains encoded authentication information;It is former that the encoded authentication information is embedded in the coding
Beginning information obtains target bits stream;Target bits circulation is changed to gray value according to default modulation system, and then is generated just
Beginning two dimensional code.The stronger original two-dimensional code of cryptographic capabilities is obtained as a result,.
In the bootlegging channel modeling method of the two dimensional code involved in the disclosure, optionally, to the default modulation
Mode uses pulse amplitude modulation mode.Thereby, it is possible to obtain original two-dimensional code by pulse amplitude modulation mode.
The second aspect of the disclosure provides a kind of coding/decoding method of two dimensional code characterized by comprising obtains illegal
The above-mentioned target two dimensional code of Fang Shengcheng, by the target two dimensional code according to default demodulation mode by grayvalue transition be target ratio
Spy's stream;The recipient obtains the encoded authentication information in the target bits stream based on the key shared with the generation side
Location information, the encoded authentication information is extracted based on the location information, and then obtain encoded authentication information and coding is former
Beginning information;And the coding raw information is decoded by the first decoding process, raw information is obtained, to the coding
Authentication information is decoded by the second decoding process, obtains authentication information.In this case, due to generation side and recipient
By location information of the shared key agreement encoded authentication information in coding raw information, recipient can be based on shared
Key knows location information, to obtain the authentication information and raw information of target two dimensional code.
In the coding/decoding method involved in the disclosure, optionally, the default demodulation mode uses impulse amplitude demodulation side
Formula.Thereby, it is possible to obtain target bits stream by impulse amplitude demodulation mode.
The third aspect of the disclosure provides a kind of bootlegging Channel Modeling system of two dimensional code, which is characterized in that packet
It includes: obtaining module, be used to obtain original two-dimensional code;First replication module is used to print the original two-dimensional code
And scanning, obtain legal two dimensional code;Second replication module is used to alternately beat the legal two dimensional code by preset times
Print and scanning, obtain target two dimensional code;Computing module, be used to calculate mean value, variance and the shape of the target two dimensional code because
Son;And processing module, it is used to establish based on the mean value, the variance and the form factor by Generalized Gauss function
Bootlegging channel model.Thereby, it is possible to obtain the bootlegging channel for being closer to actual scene, it can be used for anti-copying two
Tie up the optimization of code.
In the bootlegging Channel Modeling system involved in the disclosure, optionally, in obtaining module, prepare original letter
Breath and authentication information, are encoded the raw information by the first coding mode, are obtained coding raw information, are passed through second
Coding mode encodes the authentication information, obtains encoded authentication information;The encoded authentication information is embedded in the volume
Code raw information, obtains target bits stream;Target bits circulation is changed to gray value, Jin Ersheng according to default modulation system
At original two-dimensional code.The stronger original two-dimensional code of cryptographic capabilities is obtained as a result,.
The fourth aspect of the disclosure provides a kind of decoding apparatus of two dimensional code characterized by comprising demodulation module,
Target two dimensional code described in its claim 7 or 8 for being used to obtain illegal device generation, by the target two dimensional code according to default
Grayvalue transition is target bits stream by demodulation mode;Extraction module is used for based on the key shared with the generating means,
The location information of the encoded authentication information in the target bits stream is obtained, the encoded authentication is extracted based on the location information
Information, and then obtain encoded authentication information and coding raw information;And decoder module is used for the coding raw information
It is decoded by the first decoding process, obtains raw information, the encoded authentication information is carried out by the second decoding process
Decoding, obtains authentication information.In this case, recognized due to generating means and decoding apparatus by shared key agreement coding
Location information of the information in coding raw information is demonstrate,proved, decoding apparatus can know location information based on shared key, to obtain
Obtain the authentication information and raw information of target two dimensional code.
In the decoding apparatus involved in the disclosure, optionally, the default demodulation mode uses impulse amplitude demodulation side
Formula.Thereby, it is possible to obtain target bits stream by impulse amplitude demodulation mode.
According to the disclosure, the bootlegging channel for being closer to actual scene can be obtained by being capable of providing one kind, can be used
In the bootlegging channel modeling method and system of the two dimensional code of the optimization of anti-copying two dimensional code.
Detailed description of the invention
Embodiment of the disclosure will be explained in further detail solely by reference to the example of attached drawing now, in which:
Fig. 1 is to show the actual scene of the bootlegging channel modeling method of two dimensional code involved in the example of the disclosure
Figure.
Fig. 2 is to show the process signal of the bootlegging channel modeling method of two dimensional code involved in the example of the disclosure
Figure.
Fig. 3 is to show the curve graph of the bootlegging channel modeling method of two dimensional code involved in the example of the disclosure.
Fig. 4 is to show the structural representation of the bootlegging Channel Modeling system of two dimensional code involved in the example of the disclosure
Figure.
Fig. 5 is to show the flow diagram of the coding/decoding method of two dimensional code involved in the example of the disclosure.
Fig. 6 is to show the structural schematic diagram of the decoding apparatus of two dimensional code involved in the example of the disclosure.
Specific embodiment
Hereinafter, explaining the preferred embodiment of the disclosure in detail with reference to attached drawing.In the following description, for identical
Component assign identical symbol, the repetitive description thereof will be omitted.Scheme in addition, attached drawing is only schematical.
It should be noted that the specification and claims of the disclosure and term " first " in above-mentioned attached drawing, "
Two ", " third " and " the 4th " etc. are not use to describe a particular order for distinguishing different objects.In addition, term " includes "
" having " and their any deformations, it is intended that cover and non-exclusive include.Such as contain a series of steps or units
Process, method, system, product or equipment be not limited to listed step or unit, but optionally further comprising do not have
The step of listing or unit, or optionally further comprising for the intrinsic other steps of these process, methods, product or equipment or list
Member.
Fig. 1 is to show the actual scene of the bootlegging channel modeling method of two dimensional code involved in the example of the disclosure
Figure.
In some instances, as shown in Figure 1, electronic two-dimensional code obtains target two dimension alternately across printer and scanner
Code.Printer can be expressed as Pn, wherein n takes natural number and n indicates the quantity of printer.Scanner can be expressed as Sm, wherein
M takes natural number and m indicates the quantity of scanner.
In some instances, printer P shown in FIG. 11With printer P3It can be beating for model HP LaserJetP1108
Print machine.Printer P2With printer P4It can be the printer of model FUJIP355d.Scanner S1With scanner S3It can be type
The scanner of number BENQK810.Scanner S2With scanner S4It can be the scanner of model EPSONV330.The printing of the disclosure
The model of machine and scanner is without being limited thereto.
Fig. 2 is to show the process signal of the bootlegging channel modeling method of two dimensional code involved in the example of the disclosure
Figure.This disclosure relates to a kind of bootlegging channel modeling method of two dimensional code.
In some instances, based on above-mentioned actual scene figure, as shown in Fig. 2, the bootlegging Channel Modeling of two dimensional code
Method includes obtaining original two-dimensional code (step S110).
In step s 110, original two-dimensional code can be electronic two-dimensional code shown in FIG. 1.Original two-dimensional code can be based on original
Beginning information and authentication information obtain.Wherein, raw information can be information that user to be transmitted namely raw information and can be
The information that user is inputted, such as character string.Authentication information can be character string, binary bit stream etc..Authentication information can be with
It is authenticated for the true and false to original two-dimensional code, to verify the authenticity of original two-dimensional code.
In some instances, prepare raw information and authentication information, compiled raw information by the first coding mode
Code obtains coding raw information, encodes authentication information by the second coding mode, obtain encoded authentication information.As a result,
Raw information and authentication information are encoded by different coding modes, enhance original two-dimensional code encryption energy obtained
Power.
Specifically, the first coding mode can be multi-system Error Correction of Coding mode.Such as reed-solomon (Reed-
Solomon, RS) coding mode.RS coding is a kind of channel coding.RS coding has forward error correction capability, and it is to by correcting
Multinomial caused by over-sampling data is effective.RS coding has stronger anti-interference, noise resisting ability and error correcting capability.Separately
Outside, coding raw information can be one section of binary bit stream being made of " 0 " and " 1 ".Wherein, the second coding mode can be
Binary error-correcting code mode.Such as BCH (Bose, Ray-Chaudhuri Hocquenghem) coding mode.BCH code is one
Linear block codes in kind finite field.BCH code has the ability for correcting multiple random errors, commonly used in communication and field of storage
In error correction.Bose-Chaudhuri-Hocquenghem Code can be used for the Multilevel Phase-Shift keying of the power level of prime number grade or prime number.Compared with RS coding, BCH is compiled
The anti-interference of code, noise resisting ability and error correcting capability are weaker.It is made of in addition, encoded authentication information can be one section " 0 " and " 1 "
Binary bit stream.In this case, the first coding mode is different from the second coding mode.It is initial thereby, it is possible to reinforce
The secrecy effect of two dimensional code.
In some instances, it can be carried out simultaneously to the coding behavior of raw information and to the coding behavior of authentication information,
It can also sequentially carry out.When sequence carries out, first raw information can be encoded, first authentication information can also be compiled
Code.
In some instances, the message length of encoded authentication information can be much smaller than the message length of coding raw information.
For example, encoded authentication information can be less than the 30% of coding raw information.For example, the length of encoded authentication information is 100bits,
The length for encoding raw information is 1000bits, the length of finally obtained target bits stream be 1000bits~1100bits it
Between.
In some instances, based on coding raw information and encoded authentication information acquisition original two-dimensional code.Specifically, will
Encoded authentication information embedded coding raw information obtains target bits stream;Target bits circulation is changed according to default modulation system
For gray value, and then generate original two-dimensional code.Thereby, it is possible to further obtain the stronger original two-dimensional code of cryptographic capabilities.
In some instances, default modulation system can use quadrature amplitude modulation (Quadrature Amplitude
Modulation, QAM) mode, quadrature phase shift keying (Quadrature Phase-Shift Keying, QPSK) mode or arteries and veins
Any one of modulated mode.
In some instances, impulse modulation mode can be pulse amplitude modulation (Pulse Amplitude
Modulation, PAM) modulation system.Target bits can be circulated using PAM modulation system and be changed to gray value, and then generated
Original two-dimensional code.
Specifically, target bits stream can be made of " 0 " and " 1 ".Regard two adjacent bits as one group, then
Every group there are 4 kinds of situations, such as " 00 ", " 01 ", " 10 " and " 11 ".Different groups can be modulated to not using PAM modulation system
Same gray value, such as the corresponding gray value of above-mentioned four kinds of situations can be " 40 ", " 100 ", " 160 " and " 220 ".Based on above-mentioned
Four kinds of gray values can obtain original two-dimensional code.Wherein, every group of adjacent two bit is closed in the position of target bits stream
It is the positional relationship one-to-one correspondence with the pixel with corresponding gray value in original two-dimensional code.Impulse amplitude tune is used as a result,
Target bits can be circulated and be changed to gray value by mode processed, and then generate original two-dimensional code.The example of the disclosure is without being limited thereto,
In other examples, the binary number of adjacent three of target bits stream or more can be regarded as one group, be modulated using PAM
Different groups can be modulated to different gray values by mode, and obtain original two-dimensional code.
In some instances, the bootlegging channel modeling method of two dimensional code can also include beating original two-dimensional code
Print and scanning, obtain legal two dimensional code (step S120).
In the step s 120, based on the actual scene figure of above-mentioned Fig. 1, legal two dimensional code can be the electronics two dimension by Fig. 1
Code passes through printer P1Or printer P2In any one printer printing, using scanner S1Or scanner S2In any
What a scanner scanning obtained.Thus, it is possible to the legal two dimensional code in the case of obtaining 4 kinds.Step S110 may be implemented in generation side
With step S120.Generation side for example can be computer, printer (laser printer, ink-jet printer etc.).
In some instances, the bootlegging channel modeling method of two dimensional code can also include to legal two dimensional code by default
Number is alternately printed and is scanned, and obtains target two dimensional code (step S130).
In step s 130, illegal side is alternately printed legal two dimensional code by preset times after obtaining legal two dimensional code
And scanning.The printing and scanning of preset times can be primary.For example, target two dimensional code can be the legal two dimensional code warp by Fig. 1
Cross printer P3Or printer P4In any one printer printing, using scanner S3Or scanner S4Any of sweep
Retouch what instrument scanned.The example of the disclosure is without being limited thereto, and preset times can be repeatedly.Printing and scanning are one group of behavior,
Preset times are referred to the number for printing and scanning combination behavior.After the printing of preset times and scanning, target is obtained
Two dimensional code.Target two dimensional code can regard illegal two dimensional code as.In the disclosure, legal two dimensional code is printed and is scanned
Behavior can regard bootlegging behavior as.
In addition, since the legal two dimensional code of Fig. 1 is there are 4 kinds, after bootlegging behavior shown in FIG. 1, obtained mesh
Mark two dimensional code can be 16 kinds.
In some instances, the bootlegging channel modeling method of two dimensional code can also include the equal of calculating target two dimensional code
Value, variance and form factor (S400).
In step S140, the mean value and variance of target two dimensional code are calculated, form factor γ is calculated by following formula (1):
γ=r-1(ρ) (1)
Wherein, ρ=σ2/E2[| X |],σ2Indicate variance,J indicates the total amount of target two dimensional code sample, and μ indicates mean value, xiIndicate gray value.
In addition, the calculating of mean value and variance can be obtained by conventionally calculation mode.
In some instances, the bootlegging channel modeling method of two dimensional code can also include being based on mean value, variance and shape
The shape factor establishes bootlegging channel model (step S500) by Generalized Gauss function.
It, can be using the mean value of target two dimensional code, variance and form factor as Generalized Gauss function in step S500
Parameter is inputted, bootlegging channel model is obtained.
In some instances, based on the above-mentioned target two dimensional code for knowing Fig. 1, there are 16 kinds.To above-mentioned under different gray values
Mean value, variance and the form factor of 16 kinds of target two dimensional codes carry out statistics and obtain corresponding 16 statistical forms, for example, certain target
The statistical form of two dimensional code is as shown in table 1:
1 parametric statistics table of table
x | μ(x) | σ2(x) | γ(x) |
40 | 47.22 | 239.42 | 1.01 |
100 | 118.95 | 605.25 | 1.76 |
160 | 180.22 | 469.54 | 1.87 |
220 | 222.83 | 106.94 | 1.61 |
Wherein, μ (x) indicates mean value, σ2(x) variance is indicated, γ (x) indicates form factor.Fig. 3 shows the disclosure
The curve graph of the bootlegging channel modeling method of two dimensional code involved in example.It can be obtained according to the related data in table 1
Histogram shown in Fig. 3.The horizontal axis of Fig. 3 indicates that gray value, the longitudinal axis indicate distribution function.
In addition, obtaining broad sense using mean value, variance and the form factor in table 1 as the input parameter of Generalized Gauss function
Curve in Gaussian distribution curve such as Fig. 3.As can be seen from FIG. 3, the generalized Gaussian distribution curve in Fig. 3 coincide in Fig. 3 substantially
The profile of histogram.It can be seen that bootlegging channel and actual field that the bootlegging channel modeling method of the disclosure obtains
The bootlegging channel height of scape is similar, therefore can be good at using generalized Gaussian distribution to bootlegging Channel Modeling.
In the disclosure, legal two dimensional code and target two dimensional code are obtained based on original two-dimensional code, and is based on target two dimensional code
Mean value, variance and form factor bootlegging channel model is established by Generalized Gauss function.Thereby, it is possible to obtain more adjunction
It is bordering on the bootlegging channel of actual scene.
Fig. 4 is to show the bootlegging Channel Modeling system structure signal of two dimensional code involved in the example of the disclosure
Figure.In some instances, as shown in figure 4, the bootlegging Channel Modeling system 1 of two dimensional code includes obtaining module 11, first to answer
Molding block 12, the second replication module 13, computing module 14 and processing module 15.
In some instances, obtaining module 11 can be used for obtaining original two-dimensional code.Specifically, prepare raw information and
Authentication information is encoded raw information by the first coding mode, is obtained coding raw information, is passed through the second coding mode
Authentication information is encoded, encoded authentication information is obtained.Based on coding raw information and encoded authentication information acquisition initial two
Tie up code.The concrete function for obtaining module 11 may refer to step S110.
In some instances, the first replication module 12 can be used for that original two-dimensional code is printed and scanned, and be closed
Method two dimensional code.Process units may include obtaining module 11 and the first replication module 12.
In some instances, based on the actual scene figure of above-mentioned Fig. 1, the first replication module 12 may include the printing of Fig. 1
Machine P1, printer P2, scanner S1With scanner S2.Legal two dimensional code can be the electronic two-dimensional code by Fig. 1 by printer P1
Or printer P2In any one printer printing, using scanner S1Or scanner S2In any one scanner scanning obtain
It arrives.It specifically may refer to step S120.
In some instances, the second replication module 13 can be used for alternately printing legal two dimensional code by preset times
And scanning, obtain target two dimensional code.Illegal device may include the second replication module 13.
It in some instances, may include beating for Fig. 1 in the second replication module 13 based on the actual scene figure of above-mentioned Fig. 1
Print machine P3, printer P4, scanner S3, scanner S4.Target two dimensional code can be the legal two dimensional code by Fig. 1 by printer P3
Or printer P4In any one printer printing, using scanner S3Or scanner S4In any one scanner scanning obtain
It arrives.Preset times can be 1 time or repeatedly.It specifically may refer to step S130.
In some instances, computing module 14 can be used for calculating the mean value, variance and form factor of target two dimensional code.
In some instances, the calculating of mean value and variance can be obtained by conventionally calculation mode.Form factor γ meets
(1).It specifically may refer to step S140.
In some instances, processing module 15 can be used for passing through Generalized Gaussian letter based on mean value, variance and form factor
Number establishes bootlegging channel model.
In some instances, processing module 15 can be using the mean value of target two dimensional code, variance and form factor as broad sense
The input parameter of Gaussian function obtains bootlegging channel model.
Fig. 5 is to show the flow diagram of the coding/decoding method of two dimensional code involved in the example of the disclosure.The disclosure relates to
And two dimensional code coding/decoding method.The target two dimensional code that recipient is illegally just generated by the coding/decoding method demodulation of two dimensional code.
In some instances, as shown in figure 5, the coding/decoding method of two dimensional code includes obtaining the target two dimension illegally just generated
Code, by target two dimensional code according to default demodulation mode by grayvalue transition be target bits stream (step S210).
In step S210, target two dimensional code be can be by above-mentioned illegal side by step S130 acquisition.Wherein, in advance
If demodulation mode can use pulse demodulation mode.For example, default demodulation mode uses impulse amplitude demodulation mode.As a result, can
Enough by impulse amplitude demodulation mode, target bits stream is obtained.Such as the gray value of target two dimensional code be " 40 ", " 100 ",
When " 160 " and " 220 ", different gray values is demodulated to (by more by corresponding binary array by impulse amplitude demodulation mode
Bit composition), such as " 00 ", " 01 ", " 10 " and " 11 ".Wherein, the gray value of target two dimensional code is without being limited thereto.Pass through
Demodulation obtains binary array and is also not necessarily limited to this.
In some instances, target bits stream can be made of " 0 " and " 1 ".Target bits stream includes encoded authentication signal
With encoded authentication signal.Therefore, encoding raw information and encoded authentication information can be respectively one section and be made of " 0 " and " 1 "
Binary bit stream.Wherein, location information of the encoded authentication signal in coding raw information is determined by key.Wherein, key
Generation side and recipient share.
In some instances, as shown in figure 5, the coding/decoding method of two dimensional code may include that recipient is based on sharing with generation side
Key, obtain target bits stream in encoded authentication information location information, based on location information extract encoded authentication information,
And then obtain encoded authentication information and coding raw information (step S220).
In step S220, since the key that generation side and recipient share determines that encoded authentication signal is original in coding
The location information of information, therefore recipient can obtain the location information of the encoded authentication information in target bits stream by key.
Recipient is based on location information and extracts encoded authentication information.It is original that coding is obtained based on the bit stream after extraction encoded authentication information
Information.
In some instances, as shown in figure 5, the coding/decoding method of two dimensional code may include to coding raw information by first
Decoding process is decoded, and obtains raw information, is decoded, is authenticated by the second decoding process to encoded authentication information
Information (step S230).
In step S230, the first decoding process can use multi-system error correction decoding mode, such as RS decoding process.The
Two decoding processes can use binary system error correction decoding mode, such as BCH decoding process.As a result, using corresponding with coding mode
Decoding process, can be improved the raw information of acquisition and the accuracy of authentication information.
In the coding/decoding method of the two dimensional code of the disclosure, since generation side and recipient pass through shared key agreement coding
Location information of the authentication information in coding raw information, recipient can know location information based on shared key, to obtain
Obtain the authentication information and raw information of target two dimensional code.
Fig. 6 is to show the structural schematic diagram of the decoding apparatus of two dimensional code involved in the example of the disclosure.The disclosure relates to
And the decoding apparatus 2 of two dimensional code can abbreviation decoding apparatus 2.Above-mentioned recipient may be implemented in the modules of decoding apparatus 2
Coding/decoding method in corresponding step.Decoding apparatus 2 can be decoded two dimensional code.Decoding apparatus 2 is referred to as connecing
Receiving apparatus.Decoding apparatus 2 for example can be scanner (flat bed scanner, rotating drum image scanner etc.), mobile phone camera and its
His imaging capture device.
In some instances, as shown in figure 3, the decoding apparatus 2 of two dimensional code includes demodulation module 21, the reconciliation of extraction module 22
Code module 23.Demodulation module 21 can obtain target two dimensional code, and target two dimensional code is converted to target bits stream.Extraction module
22 can be divided into target bits stream encoded authentication signal and coding raw information.Decoder module 23 can be to encoded authentication signal
It is decoded with coding raw information and obtains authentication signal and raw information.
In some instances, the target that the available illegal device of demodulation module 21 (such as second replication module 13) generates
Two dimensional code.Grayvalue transition can be target bits stream according to default demodulation mode by demodulation module 21 by target two dimensional code.Its
In, default demodulation mode can use pulse demodulation mode.For example, default demodulation mode can be impulse amplitude demodulation mode.
Thereby, it is possible to obtain target bits stream by impulse amplitude demodulation mode.Such as the gray value of target two dimensional code be " 40 ",
When " 100 ", " 160 " and " 220 ", different gray values is demodulated to by corresponding binary array by impulse amplitude demodulation mode
(being made of multidigit binary number), such as " 00 ", " 01 ", " 10 " and " 11 ".Wherein, the gray value of target two dimensional code is not limited to
This.Binary array, which is obtained, by demodulation is also not necessarily limited to this.In addition, every group of adjacent two bit is in the position of target bits stream
Positional relationship of the relationship with the pixel with corresponding gray value in target two dimensional code is set to correspond.
In some instances, target bits stream includes encoded authentication signal and encoded authentication signal.Encoded authentication signal exists
Location information in coding raw information is determined by key.Wherein, key is that generating means and decoding apparatus 2 are shared.Wherein,
Original two-dimensional code can be generated in generating means, and original two-dimensional code can be the two dimensional code of anti-copying.Generating means for example can be
Computer, printer (laser printer, ink-jet printer etc.).
In some instances, extraction module 22 can be used for obtaining target bits based on the key shared with generating means
The location information of encoded authentication information in stream extracts encoded authentication information based on location information, and then obtains encoded authentication letter
Breath and coding raw information.
In some instances, decoder module 23 can be used for solving coding raw information by the first decoding process
Code, obtains raw information, is decoded to encoded authentication information by the second decoding process, obtains authentication information.First decoding
Mode can use multi-system error correction decoding mode, such as RS decoding process.Second decoding process can use binary system error correction
Decoding process, such as BCH decoding process.In this case, since generating means and decoding apparatus 2 pass through shared key about
Location information of the code authentication information of delimiting the organizational structure in coding raw information, decoding apparatus can know that position is believed based on shared key
Breath, to obtain the authentication information and raw information of target two dimensional code.
In the decoding apparatus 2 of the two dimensional code of the disclosure, since generating means and decoding apparatus 2 pass through shared key about
Location information of the code authentication information of delimiting the organizational structure in coding raw information, decoding apparatus 2 can know position based on shared key
Information, to obtain the authentication information and raw information of target two dimensional code.
Present embodiment discloses a kind of computer readable storage medium, those of ordinary skill in the art will appreciate that above-mentioned public affairs
All or part of the steps in the bootlegging channel modeling method for the various two dimensional codes opened and the coding/decoding method of two dimensional code is
Relevant hardware can be instructed by program (instruction) to complete, which can store in computer-readable storage
In device (storage medium), memory may include: flash disk, read-only memory (English: Read-Only Memory, referred to as:
ROM), random access device (English: Random Access Memory, abbreviation: RAM), disk or CD etc..
Although being illustrated in conjunction with the accompanying drawings and embodiments to the present invention above, it will be appreciated that above description
The invention is not limited in any way.Those skilled in the art without departing from the true spirit and scope of the present invention may be used
To deform and change to the present invention as needed, these deformations and variation are within the scope of the present invention.
Claims (10)
1. a kind of bootlegging channel modeling method of two dimensional code, which is characterized in that
Include:
Obtain original two-dimensional code;
The original two-dimensional code is printed and scanned, legal two dimensional code is obtained;
The legal two dimensional code is alternately printed and scanned by preset times, target two dimensional code is obtained;
Calculate mean value, variance and the form factor of the target two dimensional code;And
Bootlegging channel model is established by Generalized Gauss function based on the mean value, the variance and the form factor.
2. bootlegging channel modeling method according to claim 1, which is characterized in that
The form factor γ is calculated by lower formula (I):
γ=r-1(ρ) (I)
Wherein, ρ=σ2/E2[| X |],σ2Indicate variance,J indicates the total amount of target two dimensional code sample, and μ indicates mean value, xiIndicate gray value.
3. bootlegging channel modeling method according to claim 1 or 2, which is characterized in that
Further include:
Prepare raw information and authentication information, encoded the raw information by the first coding mode, it is former to obtain coding
The authentication information is encoded by the second coding mode, obtains encoded authentication information by beginning information;By the encoded authentication
Information is embedded in the coding raw information, obtains target bits stream;
Target bits circulation is changed to gray value according to default modulation system, and then generates original two-dimensional code.
4. bootlegging channel modeling method according to claim 3, which is characterized in that
The default modulation system uses pulse amplitude modulation mode.
5. a kind of coding/decoding method of two dimensional code, which is characterized in that
Include:
Target two dimensional code described in the claim 3 or 4 illegally just generated is obtained, by the target two dimensional code according to default demodulation
Grayvalue transition is target bits stream by mode;
The recipient obtains the encoded authentication information in the target bits stream based on the key shared with the generation side
Location information extracts the encoded authentication information based on the location information, and then obtains encoded authentication information and encode original
Information;And
The coding raw information is decoded by the first decoding process, obtains raw information, the encoded authentication is believed
Breath is decoded by the second decoding process, obtains authentication information.
6. coding/decoding method according to claim 5, which is characterized in that
The default demodulation mode uses impulse amplitude demodulation mode.
7. a kind of bootlegging Channel Modeling system of two dimensional code, which is characterized in that
Include:
Module is obtained, is used to obtain original two-dimensional code;
First replication module is used to that the original two-dimensional code to be printed and be scanned, obtains legal two dimensional code;
Second replication module is used to that the legal two dimensional code alternately to be printed and be scanned by preset times, obtains target
Two dimensional code;
Computing module is used to calculate mean value, variance and the form factor of the target two dimensional code;And
Processing module is used to establish based on the mean value, the variance and the form factor by Generalized Gauss function non-
Method replication channels model.
8. bootlegging Channel Modeling system according to claim 7, which is characterized in that
In obtaining module, prepares raw information and authentication information, compiled the raw information by the first coding mode
Code obtains coding raw information, encodes the authentication information by the second coding mode, obtain encoded authentication information;
The encoded authentication information is embedded in the coding raw information, obtains target bits stream;
Target bits circulation is changed to gray value according to default modulation system, and then generates original two-dimensional code.
9. a kind of decoding apparatus of two dimensional code, which is characterized in that
Include:
Demodulation module is used to obtain the target two dimensional code according to any one of claims 8 of illegal device generation, by the target two dimension
Grayvalue transition is target bits stream according to default demodulation mode by code;
Extraction module is used for based on the key shared with the generating means, and the coding obtained in the target bits stream is recognized
The location information for demonstrate,proving information extracts the encoded authentication information based on the location information, so obtain encoded authentication information and
Encode raw information;And
Decoder module is used to be decoded the coding raw information by the first decoding process, obtains raw information, right
The encoded authentication information is decoded by the second decoding process, obtains authentication information.
10. decoding apparatus according to claim 9, which is characterized in that
The default demodulation mode uses impulse amplitude demodulation mode.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910083186.4A CN109861815A (en) | 2019-01-18 | 2019-01-18 | The bootlegging channel modeling method and system of two dimensional code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910083186.4A CN109861815A (en) | 2019-01-18 | 2019-01-18 | The bootlegging channel modeling method and system of two dimensional code |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109861815A true CN109861815A (en) | 2019-06-07 |
Family
ID=66896643
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910083186.4A Pending CN109861815A (en) | 2019-01-18 | 2019-01-18 | The bootlegging channel modeling method and system of two dimensional code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109861815A (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130266925A1 (en) * | 2012-01-30 | 2013-10-10 | Arizona Board Of Regents On Behalf Of The University Of Arizona | Embedded Conversational Agent-Based Kiosk for Automated Interviewing |
US20150193780A1 (en) * | 2014-01-07 | 2015-07-09 | Joshua Migdal | Fraudulent activity detection at a barcode scanner by verifying visual signatures |
CN106529637A (en) * | 2016-10-28 | 2017-03-22 | 深圳大学 | Anti-copy realization method and realization system of two-dimensional code |
CN107766771A (en) * | 2017-11-15 | 2018-03-06 | 深圳大学 | Two-dimentional code detection method and terminal |
CN107835332A (en) * | 2017-11-15 | 2018-03-23 | 深圳大学 | It is superimposed the two-dimensional code generation method and device of man made noise's information |
CN107909133A (en) * | 2017-11-15 | 2018-04-13 | 深圳大学 | Two-dimensional code generation method, Quick Response Code coding/decoding method and terminal |
CN107918791A (en) * | 2017-11-15 | 2018-04-17 | 深圳大学 | Quick Response Code generation, coding/decoding method and device in Quick Response Code reproduction process |
-
2019
- 2019-01-18 CN CN201910083186.4A patent/CN109861815A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130266925A1 (en) * | 2012-01-30 | 2013-10-10 | Arizona Board Of Regents On Behalf Of The University Of Arizona | Embedded Conversational Agent-Based Kiosk for Automated Interviewing |
US20150193780A1 (en) * | 2014-01-07 | 2015-07-09 | Joshua Migdal | Fraudulent activity detection at a barcode scanner by verifying visual signatures |
CN106529637A (en) * | 2016-10-28 | 2017-03-22 | 深圳大学 | Anti-copy realization method and realization system of two-dimensional code |
CN107766771A (en) * | 2017-11-15 | 2018-03-06 | 深圳大学 | Two-dimentional code detection method and terminal |
CN107835332A (en) * | 2017-11-15 | 2018-03-23 | 深圳大学 | It is superimposed the two-dimensional code generation method and device of man made noise's information |
CN107909133A (en) * | 2017-11-15 | 2018-04-13 | 深圳大学 | Two-dimensional code generation method, Quick Response Code coding/decoding method and terminal |
CN107918791A (en) * | 2017-11-15 | 2018-04-17 | 深圳大学 | Quick Response Code generation, coding/decoding method and device in Quick Response Code reproduction process |
Non-Patent Citations (1)
Title |
---|
KAMRAN SHARIFI: "Estimation of shape parameter for generalized Gaussian distributions in subband decompositions of video", 《IEEE TRANSACTIONS ON CIRCUITS AND SYSTEMS FOR VIDEO TECHNOLOGY》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Chang et al. | A secure fragile watermarking scheme based on chaos-and-hamming code | |
CN103400059B (en) | Protection and the method and apparatus of checking file | |
EP1456812B1 (en) | Generating graphical codes by halftoning with embedded graphical encoding | |
CN1882026B (en) | Method of generating information embedded halftone screen code | |
CN109840576A (en) | The generation method and coding/decoding method of anti-copying two dimensional code based on segmentation insertion | |
Bulan et al. | Orientation modulation for data hiding in clustered-dot halftone prints | |
EP1949667B1 (en) | Marking images of text with speckle patterns | |
Sultan et al. | Reversible and fragile watermarking for medical images | |
Seyyedi et al. | A Secure Steganography Method Based on Integer Lifting Wavelet Transform. | |
Alajmi et al. | Steganography of encrypted messages inside valid QR codes | |
CN112016061A (en) | Excel document data protection method based on robust watermarking technology | |
Artiles et al. | Robust image watermarking algorithm using chaotic sequences | |
CN110033067A (en) | The two dimensional code of anti-copying and the anti-counterfeiting authentication method of two dimensional code | |
WO2000033282A1 (en) | Combining multiple messages with different characteristics for watermarking | |
CN113014742B (en) | Image tampering detection positioning and self-recovery method based on fragile watermark | |
CN104702814B (en) | (K, N) Image of Meaningful based on triple backups point is deposited and restoration methods | |
CN108171665B (en) | Multi-version backup and restrictive dual authentication master key (t, s, k, n) image separate storage method | |
CN109861815A (en) | The bootlegging channel modeling method and system of two dimensional code | |
CN112926087B (en) | Secret sharing method with verification function and high embedding capacity based on two-dimensional code | |
Jana et al. | Cheating prevention in Visual Cryptography using steganographic scheme | |
CN109840574B (en) | Two-dimensional code information hiding method and device, electronic equipment and storage medium | |
Zhou et al. | A QR data hiding method based on redundant region and BCH | |
CN110648271A (en) | Method for embedding digital watermark in halftone image by using special dots | |
CN111489278A (en) | Text watermark embedding and extracting method based on scrambling diffusion | |
CN109829529A (en) | The optimization method and device of the embedding parameter of anti-copying two dimensional code |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |