A kind of two dimensional code printing generation system with electronics texture
Technical field
The present invention relates to a kind of printing techniques, more particularly, to a kind of two dimensional code printing technique.
Background technique
Barcode technology be it is a kind of melt coding, printing, data acquisition and processing (DAP) in the automatic identification technology of one, bar code divides again
For one-dimension code and two dimensional code, two dimensional code also has information capacity other than having the advantages that one-dimension code is at low cost, propagation facilitates
Greatly, high reliablity, can indicate diversified forms data, the advantages that security and antiforge purpose is strong.
With the fast development of economy and Information and Communication Technology, the application of barcode technology has been directed to commodity circulation, traffic
The fields such as transport, Industry Control.Traditional bar code data storage capacity, reliability, security and antiforge purpose etc. it is all it is many-sided oneself
It is unable to satisfy new requirement, therefore two-dimensional bar code is increasingly paid attention to and is applied in more and more fields.
Two dimensional code is with certain specific geometric figure according to certain rules in the black and white phase of plane (on two-dimensional directional) distribution
The figure of news records the bar code of data symbol information.With information capacity big, high reliablity, coding mode flexibly, secrecy it is anti-
The advantages that puppet is strong.Two dimensional code is as the carrier of information and the important method and means of information collection, propagation, in each neck
Domain can play the role of improving efficiency.With intelligent terminal popularization and mobile network it is quick universal so that two dimensional code at
For the window in Future Data epoch.Planar bar code technology is in fields such as mobile e-business, text Rapid input, food safety managements
It is widely used.
Current conventional use of two dimensional code is black print two dimensional code, and pattern is by rambling black and white letter
Breath point is constituted, and shape is disorderly and unsystematic, is printed on product external packaging, the overall appearance design of product is caused very big
Destruction, influence the overall beautiful effect of packaging.
Current color 2 D code printing technique is developed on the basis of black and white planar bar code technology.The prior art
In, the acquisition pattern of color 2 D code includes that black is replaced into other monochromatic colors, and information content does not increase.In order to make to beat
The color 2 D code of print is more beautiful, and 201310211386.6 disclose a kind of Method of printing of color 2 D code, by by two
Dimension code image is matched with the image being stored in advance in image data base, so that it is determined that matched color image is as insertion
Image, to generate color 2 D code data.
But 201310211386.6 patent of invention there is a problem in that, the image stored in image data base has
Limit, it is understood that there may be can not image matched with image in 2 D code the case where;Meanwhile the two-dimension code anti-counterfeit performance generated is insufficient.
Summary of the invention
The present invention as 201310211386.6 patent of invention improvement, a kind of its technical problem of being able to solve is provided
Two dimensional code generates system.
As one aspect of the present invention, a kind of two dimensional code generation system is provided, the two dimension with electronics texture is generated
Code, comprising: receiving unit receives the two-dimensional barcode information for needing to print;Two dimensional code generating unit is based on received two-dimensional barcode information
Generate the image in 2 D code for needing to print;Storage unit stores preset for matching the color image of image in 2 D code;Matching
Image in 2 D code is matched with the color image in storage unit, is determined to the coloured silk shown in image in 2 D code by portion
Chromatic graph picture;Print image generating unit generates print image;Colour print portion, for print image to be carried out colour print;Also
Including the first tandom number generator, the first random number is generated;Second tandom number generator generates the second random number;It is described
The array information of default color image is also stored in storage unit;Electronics texture generating unit, it is raw based on the first tandom number generator
At the first random number and storage unit storage color image array information, determine in matched color image for electronics
The array of the color image of the array of texture, the second random number generated based on the second tandom number generator and storage unit storage
Information determines that this is used for the color of the array of electronics texture, and the color of array and array based on this for electronics texture generates tool
There is the color image of electronics texture;The print image generating unit is based on color image and two dimensional code figure with electronics texture
Picture generates print image.
Preferably, multiple color nozzles are arranged in the colour print portion, for spraying out color image.
Preferably, the array information of the color image includes the color that pattern matrix divides and each array corresponds to
Collection, the color set includes domain color and multiple electronics texture colors.
Preferably, each array is solid color.
Preferably, the domain color and multiple electronics texture colors are the color that color value is greater than threshold value, two
It is all black or white after value.
Preferably, the color for the array for electronics texture that the electronics texture generating unit determines is multiple electronics lines
Manage one of color.
Preferably, in the color image with electronics texture, it is not used for the color of image of the array of electronics texture
Domain color for the array stored in storage unit.
Preferably, when the matching part is matched image in 2 D code with the color image in storage unit, based on tolerance
Whether the color image in threshold decision storage unit matches with image in 2 D code, the cromogram in image in 2 D code and storage unit
The ratio of the number of all modules is greater than tolerance threshold in the inconsistent number of the color value of the respective modules of picture and image in 2 D code
When value, judging part judges that the color image and image in 2 D code mismatch;Color image in image in 2 D code and storage unit
Respective modules the inconsistent number and image in 2 D code of color value in the ratio of number of all modules be less than tolerance threshold
When, judging part judges that the color image is matched with image in 2 D code.
Preferably, the tolerance threshold is less than the error correction threshold value of two dimensional code.
Preferably, the tolerance threshold is smaller by 2%~5% than the error correction threshold value of two dimensional code.
Preferably, first tandom number generator generates one or more random number Ai, the random number AiRange
The number of arrays N for arriving color image for 1.
Preferably, second tandom number generator generates the random of such as the generation of the first tandom number generator number
Number Bi, the random number BiRange be color image array AiElectronics texture color number.
Preferably, the electronics texture generating unit is by array A in color imageiColor be set as electronics texture color number
In BiA color.
It preferably, include the website information of network memory in the received two-dimensional barcode information.
Preferably, further include image transmitting portion, the print image that print image generating unit generates is transmitted to network and is deposited
In reservoir, for being verified to the two dimensional code printed.
Preferably, the color image with electronics texture is embedded in image in 2 D code by the color image generating unit,
Generate print image.
Preferably, the color image in the storage unit and image in 2 D code resolution ratio having the same.
Preferably, the matching part further include: record portion, by the color image in image in 2 D code and storage unit into
When row matching, the inconsistent number of the color value of the respective modules of each color image in record image in 2 D code and storage unit
With the ratio of the number of modules all in image in 2 D code;From subtracting device, when in storage unit all color images and the two dimension
It is step-length with 1%, until the tolerance threshold is successively decreased to tolerance threshold less than 1% when code image all mismatches;Sentence
Disconnected portion subtract certainly device often from subtract one step-length when, judge the respective modules of each color image in image in 2 D code and storage unit
The inconsistent number and image in 2 D code of color value in all modules number ratio and tolerance threshold after the reduction
Size is less than the color image of the size of the tolerance threshold after the reduction if there is ratio, it is determined that the color image is pair
It should be in the matching image of the tolerance threshold after the reduction;If still do not deposited when subtracting portion certainly tolerance threshold being decreased below 1%
The inconsistent number of the color value of the respective modules of each color image in image in 2 D code and storage unit and two dimensional code figure
The ratio of the number of all modules is less than the color image of tolerance threshold as in, then matching part provides the knot of not matching image
Fruit.
Preferably, the matching part includes rotating part, is carried out by the color image in image in 2 D code and storage unit
Timing, if all color images and the image in 2 D code in storage unit all mismatch, the matching part carries out as follows
Operation: (1) rotating part matches after being rotated by 90 ° the image clockwise in storage unit with image in 2 D code, if there is
With successful color image, then using the color image being rotated by 90 ° as the color image shown in image in 2 D code;(2)
If matching is unsuccessful, rotating part will be matched after the image clockwise rotation 180 degree in storage unit with image in 2 D code, such as
There are the color images of successful match for fruit, then using the color image of the rotation 180 degree as the coloured silk shown in image in 2 D code
Chromatic graph picture;(3) if matching is unsuccessful, rotating part by storage unit image clockwise rotate 270 degree after with image in 2 D code
It is matched, if there is the color image of successful match, then using 270 degree of the rotation of color image as in image in 2 D code
The color image of middle display;(4) if matching is unsuccessful, it is determined that be not present and the matched cromogram of the image in 2 D code
Picture.
Detailed description of the invention
Fig. 1 is that the two dimensional code of the embodiment of the present invention generates the system structure diagram of system.
Fig. 2 is the functional block diagram of the matching part of a preferred embodiment of the invention.
Fig. 3 is the functional block diagram of the matching part of the further preferred embodiment of the present invention.
Specific embodiment
In order to illustrate more clearly of technical solution of the present invention, embodiment will be used simply to be situated between the present invention below
Continue, it should be apparent that, be described below in be only one embodiment of the present of invention, for those of ordinary skill in the art come
It says, without any creative labor, other technical solutions can also be obtained according to these embodiments, also belonged to
Disclosure of the invention range.
Referring to Fig. 1, the two dimensional code of the embodiment of the present invention prints generation system, comprising: receiving unit 10, two dimensional code generating unit
20, storage unit 30, matching part 40, the first tandom number generator 50, the second tandom number generator 60, electronics texture generating unit 70,
Print image generating unit 80, image transmitting portion 90 and colour print portion 100.
Receiving unit 10 is used to receive the two-dimensional code data for needing to print, and the two-dimensional code data for needing to print can be expression and produce
For example alphabetical, number, character or the character string conduct that they are combined into can be used in the information on product data, producer, date etc.
Indicate these information;Further include the network address of network memory in two-dimensional code data, storage therein can browse through by the network address
Image.
Received two-dimensional barcode information is generated need to print two based on two dimensional code coding rule by two dimensional code generating unit 20
Code image is tieed up, QR Code, the two dimensional code coding rule of the routine such as PDF417, Code49 can be used.
Storage unit 30, store it is preset for matching the color image of image in 2 D code, the color image of the storage with
The resolution ratio of image in 2 D code is identical, that is to say, that basic module in the size of basic module and image in 2 D code in color image
Size it is identical.The array information of preset color image is also stored in storage unit 30, the array information of color image includes figure
As the color set that array divides and each array corresponds to, color set includes domain color and multiple electronics texture colors.Figure
When dividing as array, the identical basic module of color adjacent in image can be divided into same an array.Master in color set
Color and multiple electronics texture colors are the color that color value is greater than threshold value, the setting of the threshold value make they binaryzation it
After be all black or white.
Image in 2 D code is matched with the color image in storage unit 30, is determined in two dimension by matching part 40
The color image shown in code image;Specifically, matching part 40 carries out the color image in image in 2 D code and storage unit 30
When matching, judge whether the color image in storage unit matches with image in 2 D code based on tolerance threshold, when image in 2 D code with
The number of all modules in the inconsistent number of the color value of the respective modules of color image in storage unit and image in 2 D code
Ratio when being greater than tolerance threshold, judging part judges that the color image and image in 2 D code mismatch;When image in 2 D code with deposit
The number of all modules in the inconsistent number of the color value of the respective modules of color image in storage portion and image in 2 D code
When ratio is less than tolerance threshold, judging part judges that the color image is matched with image in 2 D code.Tolerance threshold is based on two dimensional code
Error correction threshold value setting, it is preferred that the tolerance threshold is smaller by 2%~5% than the error correction threshold value of two dimensional code.For example, two dimensional code entangles
When wrong threshold value is 15%, 10%~13% can be set by tolerance threshold, it, can be with when the error correction threshold value of two dimensional code is 25%
20%~23% is set by tolerance threshold.
First tandom number generator 50 generates the first random number array;Random number A in first random number arrayiIt can
To be one or more random number, random number AiRange be 1 arrive color image number of arrays N.Second tandom number generator
60, the second random number array is generated, the second random number array and the first random number array have the random number B of the same numberi,
The random number BiRange be color image array AiElectronics texture color number.
Electronics texture generating unit 70, the first random number array generated based on the first tandom number generator 50 and storage
The array information for the color image that portion 30 stores determines the array for being used for electronics texture in matched color image, is based on second
The array information for the color image that the second random number array and storage unit 30 that tandom number generator 60 generates store determines should
The color of array for electronics texture, by array A in color imageiColor be set as the B in electronics texture color numberi
A color;And array A in color imageiExcept the color of array be set as the domain color of the array;To be used for based on this
The array of electronics texture and the color of array generate the color image with electronics texture.
Matching result of the print image generating unit 80 based on matching part has electronics for what electronics texture generating unit 70 generated
In the image in 2 D code that the color image insertion two dimensional code generating unit 20 of texture generates, print image is generated.Image transmitting portion 90
The print image of generation is transmitted in network memory, print two dimensional code identification when, by its in network memory
The print image of storage is verified.
Colour print portion 100, for print image to be carried out colour print;Conventional colour print device can be used,
Print image is subjected to colour print, such as using the printing equipment with multiple color nozzles, is sprayed out on the print medium
Color image.
A preferred embodiment of the invention referring to fig. 2, when unlike the embodiments above, matching part 40 further include: note
Record portion 401 subtracts device 402 and judging part 403 certainly.Record portion 401 is by the color image in image in 2 D code and storage unit 30
When being matched, the color value of the respective modules of each color image in record image in 2 D code and storage unit 30 is inconsistent
The ratio of the number of all modules in number and image in 2 D code.From subtracting device 402, when in storage unit all color images and institute
It is step-length with 1%, until tolerance threshold is successively decreased to tolerance threshold less than 1% when stating image in 2 D code and all mismatching.
Judging part 403 subtract certainly device 402 often from subtract one step-length when, judge each color image in image in 2 D code and storage unit
The ratio of the number of all modules and the appearance after the reduction in the inconsistent number of the color value of respective modules and image in 2 D code
The size for bearing threshold value is less than the color image of the size of the tolerance threshold after the reduction if there is ratio, it is determined that the colour
Image is the matching image corresponding to the tolerance threshold after the reduction;If subtracting portion 402 certainly decreases below 1% for tolerance threshold
When, number still inconsistent there is no the color value of the respective modules of each color image in image in 2 D code and storage unit
It is less than the color image of tolerance threshold with the ratio of the number of modules all in image in 2 D code, then matching part 40 provides no
Result with image.
By above-mentioned preferred embodiment, when matching image being not present in storage unit, it can also further determine that and be used for
Matched image, so as to generate the image in 2 D code with color electric texture.
In above-described embodiment, by the method for reduction tolerance threshold, increase the range of matching image, but the embodiment is led
The fault tolerance decline for causing the image in 2 D code generated, so that the image in 2 D code generated be made can may not to read in it when being stained
Hold.For the further improved embodiment of the present invention referring to Fig. 3, matching part 40 includes rotating part 404, by image in 2 D code and storage
When color image in portion 30 is matched, if all color images and the image in 2 D code in storage unit 30 are not
Timing, matching part 40 proceed as follows: (1) after the image clockwise in storage unit 30 is rotated by 90 ° by rotating part 404, judgement
Portion 403 matches it with image in 2 D code, if there is the color image of successful match, then the colour that is rotated by 90 ° this
Image is as the color image shown in image in 2 D code;(2) if matching is unsuccessful, rotating part 404 will be in storage unit 30
Image clockwise rotation 180 degree after, judging part 403 matches it with image in 2 D code, if there is successful match
Color image, then using the color image of the rotation 180 degree as the color image shown in image in 2 D code;(3) if
With unsuccessful, after the image clockwise in storage unit 30 is rotated 270 degree by rotating part 404, judging part 403 is by its image in 2 D code
It is matched, if there is the color image of successful match, then using 270 degree of the rotation of color image as in image in 2 D code
The color image of middle display;(4) if matching is unsuccessful, it is determined that be not present and the matched cromogram of the image in 2 D code
Picture.
By above-mentioned further improved embodiment, when matching image being not present in storage unit, printing two is not being reduced
It in the case where the serious forgiveness for tieing up code image, can also further determine that for matched image, there is colour so as to generate
The image in 2 D code of electronics texture.
All references mentioned in the present invention all incorporated by reference in this application, are individually recited just as each document
As with reference to such.It should be noted that, in this document, relational terms such as first and second and the like are used merely to one
A entity or operation with another entity or operate distinguish, without necessarily requiring or implying these entities or operation it
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant are intended to
Cover non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes those
Element, but also including other elements that are not explicitly listed, or further include for this process, method, article or setting
Standby intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in the process, method, article or apparatus that includes the element.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.