False distinguishing method, apparatus, terminal and storage medium
Technical field
The present embodiments relate to digital anti-counterfeiting technical field more particularly to a kind of false distinguishing method, apparatus, terminal and storage
Medium.
Background technique
Counterfeit and shoddy goods largely flood market at present, and various fake products emerge one after another, and not only damage goodwill, together
When also affect the life and health and property safety of consumer.For maintaining enterprise image and brand image, each large enterprises do not stint
Costly manpower financial capacity, using various counterfeit protection measures, the extensive anti fake commodity campaign of expansion, it is intended to control that fake products is prevailing to be showed
As, but all get little.
The anti-counterfeiting technology means of mainstream have at present: anti-fake, anti-fake, digital code anti-false of microcosmic coded image of material etc., these are anti-
Pseudo- technology.Wherein microcosmic coded image is anti-fake since cost is relatively low, industrial applicibility has received by force the favor of vast enterprise.It is led
Principle is wanted to conclude are as follows: microcosmic coded image is to be arranged in a combination by several micron order code-points according to certain coding rule, is known
Other instrument is tied when identifying by calculating the microcosmic coded image ID value and image correlative detail characteristic value that get, and by calculating
Fruit is compared with preset microcosmic coded image fixed reference feature, to realize that false distinguishing differentiates.But identical microcosmic volume
For code image after using different printing technology material printings, printing effect is not identical, may be due to printing technology and material
Reason, the image effect printed is very poor, and reference value standard is inherently not achieved, so using identical microcosmic coded image
Fixed reference feature is difficult to be compatible with all printing technologies and printing material, the anti-fake industry covering of microcosmic coded image as false distinguishing foundation
Face is restricted.
Summary of the invention
In view of this, the embodiment of the present invention provides a kind of false distinguishing method, apparatus, terminal and storage medium, used with realizing
A set of microcosmic coded image fixed reference feature improves microcosmic code pattern to the false distinguishing problem of the microcosmic encoded information of different printing effect
As the reliability identified, expand the covering surface of microcosmic coded image false distinguishing industry.
In a first aspect, the embodiment of the present invention provides a kind of false distinguishing method, comprising:
Obtain the microcosmic coded image of target surface of the stock;
Identify the target signature and target code information of the microcosmic coded image;
The microcosmic coded image classification of target is identified according to the target code information;
It is obtained from the preset reference property data base of server according to the microcosmic coded image classification of the target with reference to special
Sign;
According to the comparison result of the target signature and the fixed reference feature, false distinguishing result is exported.
Optionally, the target signature include: object code point mass value, target code-point sizes values, target code-point distance values,
One of the microcosmic coded image shape of target and the microcosmic coded image shading of target are a variety of, the corresponding packet of the fixed reference feature
Include: reference code point mass value, with reference to code-point sizes values, with reference to code-point distance values, with reference to microcosmic coded image shape and with reference to micro-
See one of coded image shading or a variety of.
Optionally, the comparison result according to the target signature and the fixed reference feature, output false distinguishing result include:
Confirm the relatively described amplification factor with reference to code-point sizes values of target code-point sizes values;Or
Confirm the relatively described amplification factor with reference to code-point distance values of target code-point distance values;Or
Confirm the relatively described amplification factor with reference to microcosmic coded image shape of the microcosmic coded image shape of the target;Or
Confirm the relatively described amplification factor with reference to microcosmic coded image shading of the microcosmic coded image shading of the target;
The value of magnification of the object code point mass value is calculated according to the amplification factor;
According to the comparison result of the value of magnification of the object code point mass value and the reference code point mass value, false distinguishing is exported
As a result.
Further, the comparison result according to the target signature and the fixed reference feature exports false distinguishing result packet
It includes:
According to the comparison result of the object code point mass value and the reference code point mass value;And/or
According to the target code-point sizes values and the comparison result with reference to code-point sizes values;And/or
According to the target code-point distance values and the comparison result with reference to code-point distance values;And/or
According to the microcosmic coded image shape of the target and the comparison result with reference to microcosmic coded image shape;With/
Or
According to the microcosmic coded image shading of the target and the comparison result with reference to microcosmic coded image shading, output
False distinguishing result.
Optionally, the method for building up of the preset reference property data base includes:
Obtain the sample characteristics of multiple microcosmic coded images of sample stock;
The multiple sample is divided into multiple microcosmic coded image classifications according to the sample characteristics;
According to the microcosmic coded image classification and the sample characteristics, the fixed reference feature is set.
Optionally, the method for building up of the preset reference property data base further include:
Identify the new samples feature of the microcosmic coded image of new samples stock;
Determine the phase of the new samples feature with the sample characteristics of existing each microcosmic coded image of classification sample stock
Like number;
Determine whether the maximum value of the similarity number is less than default minimum similarity number;
If the maximum value of the similarity number is less than the default minimum similarity number, by the microcosmic volume of new samples stock
Code graphic collection is new microcosmic coded image classification;
If the maximum value of the similarity number is not less than the default minimum similarity number, and the new samples stock is microcosmic
Coded image is referred to the corresponding existing microcosmic coded image classification of maximum value of the similarity number.
Further, the sample characteristics include: sample code-point mass value, sample code-point sizes values, sample code-point spacing
One of value, the microcosmic coded image shape of sample and the microcosmic coded image shading of sample are a variety of.
Second aspect, the embodiment of the present invention provide a kind of false-identifying device, comprising:
Microcosmic coded image obtains module, for obtaining the microcosmic coded image of target surface of the stock;
Target information obtains module, for identification the target signature and target code information of the microcosmic coded image;
Microcosmic coded image classification identification module, for identifying the microcosmic coded image of target according to the target code information
Classification;
Fixed reference feature obtains module, special for the preset reference according to the microcosmic coded image classification of the target from server
Fixed reference feature is obtained in sign database;
As a result output module exports false distinguishing knot for the comparison result according to the target signature and the fixed reference feature
Fruit.The third aspect, the embodiment of the present invention provide a kind of terminal, comprising:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes such as false distinguishing method provided by any embodiment of the invention.
Fourth aspect, the embodiment of the present invention provide a kind of computer readable storage medium, are stored thereon with computer program,
Such as false distinguishing method provided by any embodiment of the invention is realized when the program is executed by processor.
The embodiment of the present invention identifies the microcosmic coded image by the microcosmic coded image of acquisition target surface of the stock
Target signature and target code information, according to the target code information identify the microcosmic coded image classification of target, according to institute
It states the microcosmic coded image classification of target and obtains fixed reference feature from the preset reference property data base of server, according to the target
The comparison result of feature and the fixed reference feature exports false distinguishing result.It realizes and classifies to microcosmic coded image, according to micro-
Fixed reference feature is arranged in the classification for seeing coded image, and different printing effect can be solved using a preset reference property data base
The false distinguishing problem of microcosmic coded image improves the reliability that microcosmic coded image identifies, expands microcosmic coded image false distinguishing
The covering surface of industry.
Detailed description of the invention
Fig. 1 is a kind of flow diagram for false distinguishing method that the embodiment of the present invention one provides;
Fig. 2 is a kind of flow diagram of false distinguishing method provided by Embodiment 2 of the present invention;
Fig. 3 is the method for building up of the preset reference property data base in a kind of false distinguishing method that the embodiment of the present invention three provides
Flow diagram;
Fig. 4 is the method for building up of the preset reference property data base in a kind of false distinguishing method that the embodiment of the present invention four provides
Flow diagram;
Fig. 5 is a kind of structural schematic diagram for false-identifying device that the embodiment of the present invention five provides;
Fig. 6 is a kind of structural schematic diagram for terminal that the embodiment of the present invention six provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail
The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these
Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation
Processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.Handle the side of can correspond to
Method, function, regulation, subroutine, subprogram etc..
In addition, term " first ", " second " etc. can be used to describe herein various directions, movement, step or element etc.,
But these directions, movement, step or element should not be limited by these terms.These terms are only used to by first direction, movement, step
Rapid or element and another direction, movement, step or element are distinguished.For example, the case where not departing from scope of the present application
Under, microcosmic coded image first category can be known as microcosmic coded image second category, and similarly, it can be by microcosmic code pattern
As second category is known as microcosmic coded image first category.Microcosmic coded image first category and microcosmic coded image second category
Both microcosmic coded image classifications, but it is not same microcosmic coded image classification.Term " first ", " second " etc. without
It can be interpreted as indication or suggestion relative importance or implicitly indicate the quantity of indicated technical characteristic.Define as a result, " the
One ", the feature of " second " can explicitly or implicitly include one or more of the features.In the description of the present invention,
The meaning of " plurality " is at least two, such as two, three etc., unless otherwise specifically defined.
Embodiment one
Fig. 1 is a kind of flow diagram for false distinguishing method that the embodiment of the present invention one provides, and is applicable to using a set of figure
As feature reference value realizes that the false distinguishing situation of unlike material surface of the stock micro image, this method can be held by false-identifying device
Row, which can be realized by the way of software and/or hardware, and can be integrated at the terminal, such as smart phone, plate electricity
Brain, learning machine etc..
As shown in Figure 1, the false distinguishing method that the embodiment of the present invention one provides includes:
S110, the microcosmic coded image for obtaining target surface of the stock.
Specifically, stock, which refers to, can receive ink or adsorb colorant and the various substances of picture and text are presented, for example, copperplate
Paper, leather, fragile paper, polypropylene, water marked paper, offset paper etc..Microcosmic coded image is then one for being printed on surface of the stock
Coded image is to be arranged in a combination by several micron-sized code-points according to certain coding rule.Due to microcosmic coded image
It is technically to be printed based on full accuracy variable data printing, itself there is the natural characteristic for being difficult to replicate,
Therefore, be between the microcosmic coded image of the certified products of producer's production and the microcosmic coded image of other people premeditated duplications it is distinguishing,
It is easy the presence of information loss, some information for being included by identifying microcosmic coded image can achieve identification product
The purpose of the true and false.Optionally, user can be by using the terminal device dynamic acquisition target printing with image analysis function
The microcosmic coded image on object surface, image analysis function referred herein are the letters for referring to identify that microcosmic coded image is included
The function of breath, for example, it may be certain a dedicated image recognition software.
The target signature and target code information of S120, the identification microcosmic coded image.
Specifically, target signature and target code information are some information that microcosmic coded image is included.Wherein, mesh
Marking feature may include object code point mass value, target code-point distance values, target code-point sizes values, the microcosmic coded image shape of target
In the detailed information of the microcosmic coded image shading of shape, target and some other microcosmic coded image that can play recognition reaction
It is one or more.Code-point mass value indicates the uniformity of several code-points in microcosmic coded image, the more high then target of the uniformity
Code-point mass value is lower, otherwise higher;Code-point distance values indicate in microcosmic coded image that the spacing between code-point two-by-two, spacing are got over
It is big then target code-point distance values are bigger, on the contrary it is smaller;Code-point sizes values indicate the size of code-point in microcosmic coded image, and code-point is got over
It is big then target code-point sizes values are bigger, on the contrary it is smaller;The shape feature of the microcosmic microcosmic coded image of coded image shape representation, example
Such as, microcosmic coded image shape is circle, square, maple leaf shape etc.;Microcosmic coded image shading indicates that microcosmic coded image is adopted
The pattern and color of shading, for example, microcosmic coded image shading is the striped of blue oblique line composition.Illustratively, it identifies
Microcosmic coded image target signature be code-point mass value 55.
Encoded information indicates some information of microcosmic coded image itself, such as the flowing water when generation of microcosmic coded image
Number, date of manufacture, material classification, one of microcosmic coded image classification or a variety of, for example, target code information is
0010010000000000.Material classification refers to the material classification of target stock, for example, art paper material, leather material, easily
Shredded paper material, polypropylene material, water marked paper material, offset paper material etc..
S130, the microcosmic coded image classification of target is identified according to the target code information.
Specifically, microcosmic coded image classification is the classification carried out to microcosmic coded image, it is to obtain to microcosmic volume
Code image carries out a foundation of the fixed reference feature of false distinguishing identification.One in target code information or mostly field indicates target
Microcosmic coded image classification, it is preferred that the microcosmic coded image classification of the target of multiple target code information can be identical.It is exemplary
, microcosmic coded image classification is indicated with 3 bit digitals before in encoded information, table when first three bit digital is 001 in encoded information
Show microcosmic coded image first category, indicate microcosmic coded image second category when first three bit digital is 002 in encoded information, compiles
Microcosmic coded image third classification is indicated when first three bit digital is 003 in code information.When identification target code information is
0010010000000000,0010020000000001,0020010000000001 when, the first two target code information first three
Bit digital is 001, then the microcosmic coded image classification of the first two target is microcosmic coded image first category, third target
First three bit digital of encoded information is 002, then the microcosmic coded image classification of third target is microcosmic coded image second category.
S140, ginseng is obtained from the preset reference property data base of server according to the microcosmic coded image classification of the target
Examine feature.
Specifically, fixed reference feature is a standard for judging the true and false of microcosmic coded image, it is stored in server
In preset reference property data base in.Fixed reference feature includes reference code point mass value, with reference to code-point distance values, big with reference to code-point
It is small to be worth, with reference to microcosmic coded image shape and with reference to microcosmic coded image shading and other reference spies corresponding with target signature
One of sign is a variety of, and reference code point mass value is a mark for judging the object code point mass value true and false of microcosmic coded image
Standard is to judge a standard of the target code-point distance values true and false of microcosmic coded image with reference to code-point distance values, big with reference to code-point
Small value is to judge a standard of the target code-point sizes values true and false of microcosmic coded image, is to sentence with reference to microcosmic coded image shape
Break microcosmic coded image the microcosmic coded image shape true and false of target a standard, with reference to microcosmic coded image shading be judgement
One standard of the microcosmic coded image shading true and false of the target of microcosmic coded image.
It, can be from the preset reference property data base of server according to the currently obtained microcosmic coded image classification of target
It is middle to obtain fixed reference feature corresponding to microcosmic coded image classification.It can be with according to the fixed reference feature that microcosmic coded image classification obtains
Be it is multiple, be also possible to one, since code-point sizes values and code-point distance values can all influence code-point mass value, it is preferred that use
Code-point mass value is as a parameter for judging the microcosmic coded image true and false, then according to the fixed reference feature of target code acquisition of information
For reference code point mass value.For example, being 001 according to the microcosmic coded image classification of target, microcosmic coded image first category is obtained
Fixed reference feature be code-point mass value 63.
S150, according to the comparison result of the target signature and the fixed reference feature, export false distinguishing result.
Specifically, target signature is correspondingly compared with fixed reference feature, i.e., object code point mass value should be with reference
Code-point mass value compares, and target code-point distance values should be compared with reference code-point distance values, target code-point sizes values Ying Yucan
It examines code-point sizes values to compare, the microcosmic coded image shape of target should be compared with reference to microcosmic coded image shape, and target is micro-
Seeing coded image shading should be with the microcosmic coded image shading of reference.According to the comparison result of target signature and fixed reference feature, output
False distinguishing result includes: the comparison result according to the object code point mass value and the reference code point mass value;And/or according to
The target code-point sizes values and the comparison result with reference to code-point sizes values;And/or according to the target code-point distance values
With the comparison result with reference to code-point distance values;And/or it is micro- according to the microcosmic coded image shape of the target and the reference
See the comparison result of coded image shape;And/or microcosmic coding is referred to described according to the microcosmic coded image shading of the target
The comparison result of image shading exports false distinguishing result.
Optionally, the comparison of target signature and fixed reference feature can be the comparison for choosing a certain item feature, can also choose
Multinomial feature compares.It, can be by the way that each target signature be arranged in determining result when the multinomial feature of selection compares
Ratio a variety of be compared with corresponding fixed reference feature choose in target signature.For example, according to object code point mass value
Value of magnification and reference code point mass value comparison result and target code-point sizes values value of magnification and with reference to code-point sizes values
The comparison result of comparison result and the value of magnification of target code-point distance values and reference code-point distance values, exports comparison result,
In, the value of magnification of object code point mass value accounts for 50% compared with reference code point mass value, the value of magnification of target code-point sizes values
25% is accounted for compared with reference code-point sizes values, the value of magnification of target code-point distance values is accounted for compared with code-point distance values
25%.
Preferably, it chooses object code point mass value to compare with reference code point mass value, if object code point mass value is less than
Or be equal to reference code point mass value, then illustrate that the code-point uniformity of microcosmic coded image is higher, is certified products;If otherwise target code-point
Mass value is greater than reference code point mass value, then illustrates that microcosmic coded image is duplicate.For example, object code point mass value is 55,
Reference code point mass value is 63, and object code point mass value 55 is less than reference code point mass value 63, and the false distinguishing result of output indicates should
Target stock is certified products.
Optionally, when choose according to the microcosmic coded image shape of target with refer to microcosmic coded image shape compared with knot
Fruit, when exporting false distinguishing result, the microcosmic coded image shape of target can pass through figure compared with the microcosmic coded image shape of reference
As boundary line, image area, picture size etc. can determine one of factor of image shape or a variety of be compared.
Optionally, when choose according to the microcosmic coded image shading of target with refer to microcosmic coded image shading compared with knot
Fruit, when exporting false distinguishing result, the microcosmic coded image shading of target can pass through bottom compared with the microcosmic coded image shading of reference
One of factors such as line color, shading type, burelage a variety of are compared.
The embodiment of the present invention one identifies the microcosmic code pattern by the microcosmic coded image of acquisition target surface of the stock
The target signature and target code information of picture identify the microcosmic coded image classification of target according to the target code information, according to
The microcosmic coded image classification of target obtains fixed reference feature from the preset reference property data base of server, according to the mesh
The comparison result of feature and the fixed reference feature is marked, false distinguishing result is exported.It realizes and classifies to microcosmic coded image, according to
Fixed reference feature is arranged in the classification of microcosmic coded image, and different printing effect can be solved using a preset reference property data base
Microcosmic coded image false distinguishing problem, improve the reliability that microcosmic coded image identifies, expand microcosmic coded image mirror
The covering surface of pseudo- industry.
Embodiment two
Fig. 2 is a kind of flow diagram of false distinguishing method provided by Embodiment 2 of the present invention, and the embodiment of the present invention is second is that right
Above-described embodiment advanced optimizes.As shown in Fig. 2, this method comprises:
S210, the microcosmic coded image for obtaining target surface of the stock.
Specifically, stock, which refers to, can receive ink or adsorb colorant and the various substances of picture and text are presented, for example, copperplate
Paper, leather, fragile paper, polypropylene, water marked paper, offset paper etc..Microcosmic coded image is then one for being printed on surface of the stock
Coded image is to be arranged in a combination by several micron-sized code-points according to certain coding rule.The certified products of producer's production
Be between microcosmic coded image and the microcosmic coded image of other people premeditated duplications it is distinguishing, pass through the microcosmic coded image institute of identification
The some information for including can achieve the purpose for identifying authenticity of products.
Optionally, user can be by using the terminal device dynamic acquisition target stock table with image analysis function
The microcosmic coded image in face, image analysis function referred herein are the information for referring to identify that microcosmic coded image is included
Function, for example, it may be certain a dedicated image recognition software.
The target signature and target code information of S220, the identification microcosmic coded image, wherein the target signature packet
Include object code point mass value, target code-point distance values, the microcosmic coded image shape of target code-point sizes values target, the microcosmic volume of target
One of code image shading is a variety of.
Specifically, target signature and target code information are some information that microcosmic coded image is included.Wherein, mesh
Marking feature includes object code point mass value, target code-point distance values, the microcosmic coded image shape of target code-point sizes values target, mesh
Mark one in the detailed information of microcosmic coded image shading and some other microcosmic coded image that can play recognition reaction
Kind is a variety of.Code-point mass value indicates the uniformity of several code-points in microcosmic coded image, the more high then target code-point of the uniformity
Mass value is lower, otherwise higher;Code-point distance values indicate in microcosmic coded image the spacing between code-point two-by-two, spacing more it is big then
Target code-point distance values are bigger, otherwise smaller;Code-point sizes values indicate the profile size of code-point in microcosmic coded image, and code-point is got over
It is big then target code-point sizes values are bigger, on the contrary it is smaller;The shape feature of the microcosmic microcosmic coded image of coded image shape representation, example
Such as, microcosmic coded image shape is circle, square, maple leaf shape etc.;Microcosmic coded image shading indicates that microcosmic coded image is adopted
The pattern and color of shading, for example, microcosmic coded image shading is the striped of blue oblique line composition.Illustratively, it identifies
Microcosmic coded image target signature be object code point mass value 65, target point sizes values be 80.
Encoded information indicates some information of microcosmic coded image itself, such as the flowing water when generation of microcosmic coded image
Number, date of manufacture, material classification, one of microcosmic coded image classification or a variety of, for example, identification target code information is
0010010000000000.Material classification refers to the material classification of target stock, for example, art paper material, leather material, easily
Shredded paper material, polypropylene material, water marked paper material, offset paper material etc..
S230, the microcosmic coded image classification of target is identified according to the target code information.
Specifically, microcosmic coded image classification is the classification carried out to microcosmic coded image, it is to obtain to microcosmic volume
Code image carries out a foundation of the fixed reference feature of false distinguishing identification.One in target code information or mostly field indicates target
Microcosmic coded image classification, it is preferred that the microcosmic coded image classification of the target of multiple target code information can be identical.It is exemplary
, microcosmic coded image classification is indicated with 3 bit digitals before in encoded information, table when first three bit digital is 001 in encoded information
Show microcosmic coded image first category, indicate microcosmic coded image second category when first three bit digital is 002 in encoded information, compiles
Microcosmic coded image third classification is indicated when first three bit digital is 003 in code information.When identification target code information is
0010010000000000,0010020000000001,0020010000000001 when, the first two target code information first three
Bit digital is 001, then the microcosmic coded image classification of the first two target is microcosmic coded image first category, third target
First three bit digital of encoded information is 002, then the microcosmic coded image classification of third target is microcosmic coded image second category.
S240, ginseng is obtained from the preset reference property data base of server according to the microcosmic coded image classification of the target
Examine feature, wherein the fixed reference feature include reference code point mass value, with reference to code-point sizes values, with reference to code-point distance values, reference
Microcosmic coded image shape, with reference to one of microcosmic coded image shading or a variety of.
Specifically, fixed reference feature is a standard for judging the true and false of microcosmic coded image, it is stored in server
In preset reference property data base in.Fixed reference feature includes reference code point mass value, with reference to code-point distance values, big with reference to code-point
It is small to be worth, with reference to microcosmic coded image shape and with reference to microcosmic coded image shading and other reference spies corresponding with target signature
One of sign is a variety of, and reference code point mass value is a mark for judging the object code point mass value true and false of microcosmic coded image
Standard is to judge a standard of the target code-point distance values true and false of microcosmic coded image with reference to code-point distance values, big with reference to code-point
Small value is to judge a standard of the target code-point sizes values true and false of microcosmic coded image, is to sentence with reference to microcosmic coded image shape
Break microcosmic coded image the microcosmic coded image shape true and false of target a standard, with reference to microcosmic coded image shading be judgement
One standard of the microcosmic coded image shading true and false of the target of microcosmic coded image.
It, can be from the preset reference property data base of server according to the currently obtained microcosmic coded image classification of target
Fixed reference feature corresponding to middle acquisition target code information.Can be according to the fixed reference feature of target code acquisition of information it is multiple,
It is also possible to one, since code-point sizes values and code-point distance values can all influence code-point mass value, it is preferred that use code-point quality
Value is then reference code according to the fixed reference feature of target code acquisition of information as a parameter for judging the microcosmic coded image true and false
Point mass value.For example, being 001 according to the microcosmic coded image classification of target, the reference for obtaining microcosmic coded image first category is special
Sign is reference code point mass value 63, with reference to code-point sizes values 75.
S250, the confirmation relatively described amplification factor with reference to code-point sizes values of target code-point sizes values.
Specifically, the opposite amplification factor for referring to code-point sizes values of target code-point sizes values is k0, then according to formula (2-1):
Wherein, ZrFor target code-point sizes values, ZcTo refer to code-point sizes values.
Illustratively, target code-point sizes values are 80, with reference to code-point sizes values 75, calculate target code-point according to formula (2-1)
The opposite amplification factor for referring to code-point sizes values of sizes values is k0=1.07.
Optionally, calculating amplification factor is k0When, by target code-point distance values and code-point distance values meter can also be referred to
Amplification factor is calculated, for example, by the target code-point spacing average value between three code-points and referring to code-point spacing mean value calculation
Amplification factor.
Optionally, amplification factor, example are calculated by the microcosmic coded image shape of target and with reference to microcosmic coded image shape
Such as, the area for being included by the microcosmic coded image shape of target and the areal calculation for being included with reference to microcosmic coded image shape
Amplification factor.
Optionally, amplification factor, example are calculated by the microcosmic coded image shading of target and with reference to microcosmic coded image shading
Such as, amplification factor is calculated by the microcosmic coded image shading colorfulness of target and with reference to microcosmic coded image shading colorfulness.
S260, the value of magnification that the code-point mass value is calculated according to the amplification factor.
Specifically, calculating the amplification coefficient K of object code point mass value first, calculated according to formula (2-2):
(a, b are constant, and a > 1, b > 1) (2-2)
Then the value of magnification Q of object code point mass value is calculated0, it is calculated according to formula (2-3):
Q0=KQi (2-3)
Wherein, QiFor object code point mass value.
Illustratively, the opposite amplification factor for referring to code-point sizes values of target code-point sizes values is k0=1.07, object code
Point mass value is 70, and reference code point mass value is 63, a=4, b=2, and the amplification of object code point mass value is calculated according to formula (2-2)
Coefficient is K=1.21, is Q according to the value of magnification of formula (2-3) object code point mass value0=84.7.
S270, value of magnification and the comparison result of the reference code point mass value according to the object code point mass value, it is defeated
False distinguishing result out.
Specifically, exporting false distinguishing result is to be somebody's turn to do if the value of magnification of object code point mass value is greater than reference code point mass value
Target stock is Counterfeit Item, if the value of magnification of object code point mass value exports false distinguishing result less than reference code point mass value
It is certified products for the target stock.For example, the value of magnification of object code point mass value is 84.7, reference code point mass value is 63, mesh
The value of magnification 84.7 of coding point mass value is greater than reference code point mass value 63, and it is imitated that output false distinguishing result, which is the target stock,
Product.
By amplifying to target signature, can identify whether microcosmic coded image is Counterfeit Item easily, so that with
It family, also can be correct even if the target signature deviation recognized is larger when light is severe, terminal device holds unstable
Identify the true and false of the microcosmic coded image.In this case it is also possible to relax the setting range of fixed reference feature, for example, just
Normal reference code point mass value is 63, if setting 70 for code-point mass value, by using mirror provided by Embodiment 2 of the present invention
Fake method can also identify the true and false of microcosmic coded image.
The embodiment of the present invention two is by obtaining code-point quality value of magnification after amplifying code-point mass value, then by code-point
Quality value of magnification is compared with reference code point mass value, is obtained the true and false of microcosmic coded image and is being used as a result, reducing user
Terminal device carries out requirement when microcosmic coded image obtains, and reduces influence of the environmental factor to false distinguishing recognition result.
Embodiment three
Fig. 3 is the method for building up of the preset reference property data base in a kind of false distinguishing method that the embodiment of the present invention three provides
Flow diagram, the embodiment of the present invention third is that the establishment process of the preset reference property data base in above-described embodiment into
The description of one step.As shown in figure 3, the method for building up of preset reference property data base includes:
S310, the sample characteristics for obtaining multiple microcosmic coded images of sample stock.
Specifically, sample characteristics include sample code-point mass value, sample code-point sizes values, sample code-point distance values, sample
One of microcosmic coded image shape and the microcosmic coded image shading of sample are a variety of, and code-point mass value indicates microcosmic code pattern
The uniformity of several code-points as in, the more high then object code point mass value of the uniformity is lower, otherwise higher;Code-point distance values indicate
Spacing between code-point two-by-two in microcosmic coded image, the more big then target code-point distance values of spacing are bigger, otherwise smaller;Code-point is big
Small value indicates the size of code-point in microcosmic coded image, and the more big then target code-point sizes values of code-point are bigger, otherwise smaller;Microcosmic volume
Code image shape indicates the shape feature of microcosmic coded image, for example, microcosmic coded image shape is round, square, maple leaf
Shape etc.;Microcosmic coded image shading indicates the pattern and color for the shading that microcosmic coded image uses, for example, microcosmic coded image
Shading is the striped of blue oblique line composition.
Illustratively, by taking sample code-point mass value as an example, the sample code-point of 7 microcosmic coded images of sample stock is obtained
Mass value is respectively as follows: 48,50,55,140,145,150,200.
S320, the multiple sample is divided into multiple microcosmic coded image classifications according to the sample characteristics.
Specifically, classified according to sample characteristics to microcosmic coded image, it can be by the similar multiple of sample characteristics
The microcosmic coded image of sample stock is classified as one kind.Illustratively, be respectively by sample code-point mass value 48,50,55 sample
The microcosmic coded image of this stock is classified as microcosmic coded image first category, be respectively 140 by sample code-point mass value, 145,
The microcosmic coded image of 150 sample stock is classified as microcosmic coded image second category, is 200 by sample code-point mass value
The microcosmic coded image of sample stock is classified as microcosmic coded image third classification.
Optionally, microcosmic coded image classification can also classify according to the material classification of microcosmic coded image, can also
It, can also be according to the material classification of microcosmic coded image and printer to be classified according to the printing technology of microcosmic coded image
The printing effect for total microcosmic coded image that skill is formed is classified.Illustratively, by art paper material, leather material, easily
Shredded paper material and polypropylene material are classified as same category, and water marked paper material and offset paper material are classified as same category.
S330, the fixed reference feature is arranged according to the microcosmic coded image classification and the sample characteristics.
Specifically, the microcosmic each classification of coded image all sets fixed reference feature corresponding with sample characteristics, fixed reference feature can
To be the average value floating certain proportion of sample characteristics under the microcosmic coded image classification, it is also possible to the microcosmic coded image class
The maximum value or minimum value floating certain proportion of sample characteristics are not descended.In view of user is known using mobile device in practical situations
When the microcosmic coded image of other surface of the stock, the influence of the factors such as barcode scanning speed, environment, floating ratio is usually set to
10%-15%.Illustratively, by taking sample code-point mass value as an example, the sample code-point matter seen under each classification of coded image is chosen
The maximum value of magnitude floats 15% as reference code point mass value, then, the reference code point mass of microcosmic coded image first category
Value is 55* (100%+15%)=63, and the reference code point mass value of microcosmic coded image second category is 150* (100%+
15%)=173, the reference code point mass value of microcosmic coded image third classification is 200* (100%+15%)=230.
Optionally, when the microcosmic code pattern using the false distinguishing method identification target surface of the stock in the embodiment of the present invention two
When the true and false of picture, due to the setting of amplification factor and amplification coefficient, the shadow of the factors such as barcode scanning speed, environment when using user
Sound further relaxes, and the floating ratio of fixed reference feature can achieve 15%-40%.Illustratively, it is with sample code-point mass value
Example chooses the maximum value floating 40% for seeing the sample code-point mass value under each classification of coded image as reference code point mass
Value, then, the reference code point mass value of microcosmic coded image first category are 55* (100%+40%)=77, microcosmic coded image
The reference code point mass value of second category is 150* (100%+40%)=210, the reference code of microcosmic coded image third classification
Point mass value is 200* (100%+40%)=280.Object code point matter is calculated in the step S260 of the embodiment of the present invention two
The value of magnification of magnitude is Q0=84.7, at this time by can compared with the reference code point mass value 77 of microcosmic coded image first category
Know, the value of magnification 84.7 of object code point mass value is greater than reference code point mass value 77, and output false distinguishing result is the target stock
For Counterfeit Item, still available correct false distinguishing result.
The sample characteristics that the embodiment of the present invention three passes through the multiple microcosmic coded images of sample stock of acquisition;According to the sample
The multiple sample is divided into multiple microcosmic coded image classifications by eigen;According to the microcosmic coded image classification and the sample
The fixed reference feature is arranged in eigen.The foundation for realizing preset reference property data base, by different microcosmic code patterns
As different fixed reference features is arranged in type, keep the authenticity of microcosmic coded image more accurate reliable.
Example IV
Fig. 4 is the method for building up of the preset reference property data base in a kind of false distinguishing method that the embodiment of the present invention four provides
Flow diagram, the embodiment of the present invention is fourth is that further expanding to above-described embodiment three, suitable for not being included into new
The classification of the microcosmic coded image of the stock of existing preset reference property data base.As shown in figure 4, the embodiment of the present invention four mentions
The method for building up of the preset reference property data base of confession includes:
S410, the new samples feature for identifying the microcosmic coded image of new samples stock.
Specifically, needing when there is the new stock for not being included into existing preset reference property data base to occur to existing
There is preset reference property data base to be expanded.The new samples feature of the microcosmic coded image of new samples stock is obtained, including new
Sample code-point mass value, new samples code-point distance values, new samples code-point sizes values, the microcosmic coded image shape of new samples, new sample
One in the detailed information of this microcosmic coded image shading and some other microcosmic coded image that can play recognition reaction
Kind is a variety of.Illustratively, by taking code-point mass value as an example, new samples code-point mass value is 60.
S420, the sample characteristics for determining the new samples feature Yu existing each microcosmic coded image of classification sample stock
Similarity number.
Specifically, similarity number can be by the deviation of new samples feature and the sample characteristics of existing each classification sample stock
To calculate.The deviation of new samples feature and an available sample feature is within preset range, new samples feature and the existing sample
The similarity number of eigen can be denoted as 1, otherwise be denoted as 0, by the sample characteristics ratio of new samples feature and each classification sample stock
Compared with similarity number be overlapped, then available new samples feature and existing each microcosmic coded image of classification sample stock
The similarity number of sample characteristics.
Illustratively, preset range 0-20%, new samples code-point mass value are 60, the existing microcosmic coded image first kind
Other sample code-point mass value is 48,50,55, the sample code-point mass value of existing microcosmic coded image second category is 140,
145,150, the sample code-point mass value of existing microcosmic coded image third classification is 200.Deviation=(new samples code-point mass value
With absolute value of the difference/available sample code-point mass value of available sample code-point mass value) * 100%.Obtain new samples code-point quality
The similarity number of value and the sample code-point mass value of existing microcosmic coded image first category is 2, new samples code-point mass value and existing
Have the sample code-point mass value of microcosmic coded image second category similarity number be 0, new samples code-point mass value with it is existing microcosmic
The similarity number of the sample code-point mass value of coded image third classification is 0.
S430, determine whether the maximum value of the similarity number is less than default minimum similarity number.
Specifically, minimum similarity number is with to determine whether need to carry out individually the microcosmic coded image of new samples stock
Classification.If the maximum value of similarity number is less than default minimum similarity number, S440 is thened follow the steps;If the maximum value of similarity number is not less than
Default minimum similarity number, thens follow the steps S450.Illustratively, minimum similarity number is set as 1, can according to the calculating of step S420
Know, the maximum value of similarity number is 2, then the maximum value 2 of similarity number is set as 1 greater than minimum similarity number, then should execute step S450, will
The sample is referred to microcosmic coded image first category.
If the maximum value of S440, the similarity number is less than the default minimum similarity number, by the new samples stock
Microcosmic coded image is classified as new microcosmic coded image classification.
If the maximum value of S450, the similarity number is not less than the default minimum similarity number, by the new samples printing
The microcosmic coded image of object is referred to the corresponding existing microcosmic coded image classification of maximum value of the similarity number.
A kind of method for building up for the preset reference property data base in false distinguishing method that the embodiment of the present invention four provides, passes through
Identify the new samples feature of the microcosmic coded image of new samples stock;Determine the new samples feature and existing each classification sample
The similarity number of the sample characteristics of the microcosmic coded image of stock;Determine whether the maximum value of the similarity number is less than default minimum phase
Like number;If the maximum value of the similarity number is less than the default minimum similarity number, by the microcosmic coding of new samples stock
Graphic collection is new microcosmic coded image classification;If the maximum value of the similarity number is not less than the default minimum similarity number,
The corresponding existing microcosmic coded image of the maximum value that the microcosmic coded image of new samples stock is referred to the similarity number
Classification.Realize the microscopic feature image category progress to the new stock for not being included into existing preset reference property data base
Classification.
Embodiment five
Fig. 5 is a kind of structural schematic diagram for false-identifying device that the embodiment of the present invention three provides, and the present embodiment is applicable to make
The false distinguishing situation of unlike material surface of the stock micro image is realized with a set of characteristics of image reference value.The device can use soft
The mode of part and/or hardware is realized, and can be integrated at the terminal, such as smart phone, tablet computer, learning machine etc..The present invention
False distinguishing method provided by any embodiment of the invention can be performed in false-identifying device provided by embodiment, and it is corresponding to have execution method
Functional module and beneficial effect.The content of not detailed description can be real with reference to any means of the present invention in the embodiment of the present invention three
Apply the description in example.
As shown in figure 5, the embodiment of the present invention three provide false-identifying device 500 include microcosmic coded image obtain module 510,
Target information obtains module 520, fixed reference feature obtains module 530 and result output module 540, in which:
Microcosmic coded image obtains module 510, for obtaining the microcosmic coded image of target surface of the stock;
Target information obtains module 520, for identification the target signature and target code information of the microcosmic coded image;
Microcosmic coded image classification identification module 530, for identifying the microcosmic coding of target according to the target code information
Image category;
Fixed reference feature obtains module 540, for the default ginseng according to the microcosmic coded image classification of the target from server
It examines and obtains fixed reference feature in property data base;
As a result output module 550 export false distinguishing for the comparison result according to the target signature and the fixed reference feature
As a result.
Optionally, the result output module 550 includes:
Amplification factor confirmation unit, for confirming the amplification factor of the relatively described fixed reference feature of the target signature;
Target signature value of magnification confirmation unit, for calculating the corresponding target of the target signature according to the amplification factor
The value of magnification of feature;
False distinguishing result output unit, for the value of magnification according to the target signature compared with the fixed reference feature knot
Fruit exports false distinguishing result.
Further, the target signature includes: object code point mass value, target code-point sizes values, target code-point spacing
One of value, the microcosmic coded image shape of target and the microcosmic coded image shading of target are a variety of, and the fixed reference feature is corresponding
Include: reference code point mass value, with reference to code-point sizes values, with reference to code-point distance values, with reference to microcosmic coded image shape and reference
One of microcosmic coded image shading is a variety of.
Further, the result output module 550 further include:
First result output unit, for according to the object code point mass value compared with the reference code point mass value
As a result, output false distinguishing result;And/or
Second result output unit, for according to the target code-point sizes values compared with the sizes values with reference to code-point
As a result, output false distinguishing result;And/or
Third result output unit, for according to the target code-point distance values compared with the distance values with reference to code-point
As a result, output false distinguishing result;And/or
4th result output unit, for referring to microcosmic code pattern with described according to the microcosmic coded image shape of the target
As the comparison result of shape, false distinguishing result is exported;And/or
5th result output unit, for referring to microcosmic code pattern with described according to the microcosmic coded image shading of the target
As the comparison result of shading, false distinguishing result is exported.
Optionally, the false-identifying device 500 further includes that preset reference property data base establishes module, and the preset reference is special
Levying Database module includes:
Sample characteristics acquiring unit, for obtaining the sample characteristics of multiple microcosmic coded images of sample stock;
Microcosmic coded image category classification unit, it is multiple micro- for being divided into the multiple sample according to the sample characteristics
See coded image classification;
Fixed reference feature setting unit, for the ginseng to be arranged according to the microcosmic coded image classification and the sample characteristics
Examine feature.
Optionally, the preset reference property data base establishes module further include:
New samples feature identification unit, for identification the new samples feature of the microcosmic coded image of new samples stock;
Similarity number determination unit, for determining the new samples feature and existing each microcosmic coding of classification sample stock
The similarity number of the sample characteristics of image;
Similarity number judging unit, for determining whether the maximum value of the similarity number is less than default minimum similarity number;
New microcosmic coded image classification setting unit, if the maximum value for the similarity number is less than the default minimum phase
Like number, then the microcosmic coded image of new samples stock is classified as new microcosmic coded image classification;
New microcosmic coded image classification sorts out unit, if the maximum value for the similarity number is not less than the default minimum
Similarity number, the then maximum value for the microcosmic coded image of new samples stock being referred to the similarity number are corresponding existing microcosmic
Coded image classification.
Further, the sample characteristics include: sample code-point mass value, sample code-point sizes values, sample code-point spacing
One of value, the microcosmic coded image shape of sample and the microcosmic coded image shading of sample are a variety of.
The embodiment of the present invention five obtains module by microcosmic coded image, for obtaining the microcosmic volume of target surface of the stock
Code image;Target information obtains module, for identification the target signature and target code information of the microcosmic coded image;It is microcosmic
Coded image classification identification module, for identifying the microcosmic coded image classification of target according to the target code information;With reference to spy
Sign obtains module, for being obtained from the preset reference property data base of server according to the microcosmic coded image classification of the target
Fixed reference feature;As a result output module exports false distinguishing knot for the comparison result according to the target signature and the fixed reference feature
Fruit.It realizes and classifies to microcosmic coded image, fixed reference feature is arranged according to the classification of microcosmic coded image, according to different
Different printing effect can be solved using a preset reference property data base in the different fixed reference feature of target code acquisition of information
Microcosmic coded image false distinguishing problem, improve the reliability that microcosmic coded image identifies, expand microcosmic coded image mirror
The covering surface of pseudo- industry.
Embodiment six
Fig. 6 is a kind of structural schematic diagram for terminal that the embodiment of the present invention four provides.Fig. 6, which is shown, to be suitable for being used to realizing this
The block diagram of the exemplary terminal 612 of invention embodiment.The terminal 612 that Fig. 6 is shown is only an example, should not be to the present invention
The function and use scope of embodiment bring any restrictions.
As shown in fig. 6, terminal 612 is showed in the form of general purpose terminal.The component of terminal 612 can include but is not limited to:
One or more processor 616, storage device 628 connect different system components (including storage device 628 and processor
616) bus 618.
Bus 618 indicates one of a few class bus structures or a variety of, including storage device bus or storage device control
Device processed, peripheral bus, graphics acceleration port, processor or total using the local of any bus structures in a variety of bus structures
Line.For example, these architectures include but is not limited to industry standard architecture (Industry Subversive
Alliance, ISA) bus, microchannel architecture (Micro Channel Architecture, MAC) bus is enhanced
Isa bus, Video Electronics Standards Association (Video Electronics Standards Association, VESA) local are total
Line and peripheral component interconnection (Peripheral Component Interconnect, PCI) bus.
Terminal 612 typically comprises a variety of computer system readable media.These media can be it is any can be by terminal
The usable medium of 612 access, including volatile and non-volatile media, moveable and immovable medium.
Storage device 628 may include the computer system readable media of form of volatile memory, such as arbitrary access
Memory (Random Access Memory, RAM) 630 and/or cache memory 632.Terminal 612 can be wrapped further
Include other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as an example, storage system
634 can be used for reading and writing immovable, non-volatile magnetic media (Fig. 6 do not show, commonly referred to as " hard disk drive ").Although
It is not shown in Fig. 6, the disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided, and
To removable anonvolatile optical disk, such as CD-ROM (Compact Disc Read-Only Memory, CD-ROM), number
Optic disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical mediums) read-write CD drive
Dynamic device.In these cases, each driver can be connected by one or more data media interfaces with bus 618.It deposits
Storage device 628 may include at least one program product, which has one group of (for example, at least one) program module, this
A little program modules are configured to perform the function of various embodiments of the present invention.
Program/utility 640 with one group of (at least one) program module 642 can store in such as storage dress
It sets in 628, such program module 642 includes but is not limited to operating system, one or more application program, other program moulds
It may include the realization of network environment in block and program data, each of these examples or certain combination.Program module
642 usually execute function and/or method in embodiment described in the invention.
Terminal 612 can also be logical with one or more external equipments 614 (such as keyboard, direction terminal, display 624 etc.)
Letter, can also be enabled a user to one or more terminal interact with the terminal 612 communicate, and/or with make the terminal 612
Any terminal (such as network interface card, modem etc.) communication that can be communicated with one or more of the other computing terminal.This
Kind communication can be carried out by input/output (I/O) interface 422.Also, terminal 612 can also by network adapter 620 with
One or more network (such as local area network (Local Area Network, LAN), wide area network (Wide Area Network,
WAN) and/or public network, for example, internet) communication.As shown in fig. 6, network adapter 620 passes through bus 618 and terminal 612
Other modules communication.It should be understood that although not shown in the drawings, other hardware and/or software mould can be used in conjunction with terminal 612
Block, including but not limited to: microcode, terminal driver, redundant processor, external disk drive array, disk array
(Redundant Arrays of Independent Disks, RAID) system, tape drive and data backup storage system
System etc..
The program that processor 616 is stored in storage device 628 by operation, thereby executing various function application and number
According to processing, such as realize false distinguishing method provided by any embodiment of the invention, this method may include:
Obtain the microcosmic coded image of target surface of the stock;
Identify the target signature and target code information of the microcosmic coded image;
The microcosmic coded image classification of target is identified according to the target code information;
It is obtained from the preset reference property data base of server according to the microcosmic coded image classification of the target with reference to special
Sign;
According to the comparison result of the target signature and the fixed reference feature, false distinguishing result is exported.
Embodiment seven
The embodiment of the present invention seven additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should
Realize that such as false distinguishing method provided by any embodiment of the invention, this method may include: when program is executed by processor
Obtain the microcosmic coded image of target surface of the stock;
Identify the target signature and target code information of the microcosmic coded image;
The microcosmic coded image classification of target is identified according to the target code information;
It is obtained from the preset reference property data base of server according to the microcosmic coded image classification of the target with reference to special
Sign;
According to the comparison result of the target signature and the fixed reference feature, false distinguishing result is exported.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or
Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool
There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires
(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
It further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on remote computer or terminal completely on the remote computer on the user computer.It is relating to
And in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or extensively
Domain net (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as provided using Internet service
Quotient is connected by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.