Good antifalse label generation method based on computerized algorithm
Technical field
The present invention relates to a kind of good antifalse label generation method based on computerized algorithm.
Background technology
With the high speed development of Internet of Things, the daily shopping of people all the more convenient and swift, and the development of commodity economy, personation counterfeit product is prevailing therewith, therefore people are increasingly concerned with how to avoid buying the counterfeit commodity of personation, how easily to examine authenticity of products.Pseudo label life can effectively check fakement phenomena, merchandise news feature and know the important means that method for distinguishing is the counterfeit commodity of identification personation that antifalsification label is included, false proof is the Prevention method for those for the purpose of deception and carrying out activity that is imitated or replicating without owner's allowance and taking.Existing antifalsification label mostly causes antifalsification label to include merchandise news feature for the change to physical behaviors such as paper, word, pattern, decorative patterns in printing process, and then realizes false proof purpose.But such antifalsification label is by a relatively simple, be easily cracked imitation, so as to lose the function of checking fakement phenomena.
The content of the invention
The technical problems to be solved by the invention are to provide a kind of good antifalse label generation method based on computerized algorithm, this method generates antifalsification label using computerized algorithm combination merchandise news feature, improve the complexity of antifalsification label and convenient identification, the difficulty for cracking imitation is added, effectively checks the fakement phenomena of commodity.
In order to solve the above technical problems, the good antifalse label generation method of the invention based on computerized algorithm comprises the following steps:
Step 1: working out length for the security code of 32 bit bytes according to merchandise news feature and importing computer, the cryptographic Hash of the security code is calculated by computer, the length of cryptographic Hash is 512 bit bytes;
Step 2: cryptographic Hash is split as into 16 × 32 groups of data, every group of data describe two points so that it is determined that straight line, a plurality of straight line of 16 × 32 groups of data is drawn in drawing area;
Step 3: computer reads 14 characters that system time obtains system time, to 14 random combination of two of character, multiple polygon center point coordinates are generated in drawing area, polygonal side number, the length of side and adjacent edge angle are set at random and the plurality of polygon is drawn in drawing area;
Step 4: defining the radius of every straight line and each polygonal color, line width and Intersection Point at random, a width random pattern is generated, computer preserves the random pattern and generates picture file by specified format;
Step 5: picture file inputs print publishing system, antifalsification label is obtained by the printing of print publishing system.
Further, merchandise news feature includes commodity unique sequence numbers, trade name, commercial specification, manufacturer's information, retailer's information, commodity and traced to the source information and material flow tracking information.
Further, cryptographic Hash is calculated using MD5 One-way encryption algorithm by computer and obtained.
Further, the specified format of picture file includes JPG files, PNG files or pdf document.
Because good antifalse label generation method of the present invention based on computerized algorithm employs above-mentioned technical proposal, i.e. this method first according to merchandise news feature establishment security code and imports computer, 512 bit byte cryptographic Hash of the security code are calculated by computer;Cryptographic Hash is split as 16 × 32 groups of data, every group of data describe two points so that it is determined that straight line, a plurality of straight line of 16 × 32 groups of data is drawn in drawing area;Computer reads system time and obtains 14 characters, to 14 random combination of two of character, generates multiple polygon center point coordinates, and draw the plurality of polygon in drawing area;The radius of every straight line and each polygonal color, line width and Intersection Point is defined at random, a width random pattern is generated, and computer preserves the random pattern and generates picture file;Picture file, which inputs print publishing system and printed, obtains antifalsification label.This method generates antifalsification label using computerized algorithm combination merchandise news feature, improves the complexity of antifalsification label and convenient identification, adds the difficulty for cracking imitation, effectively check the fakement phenomena of commodity.
Brief description of the drawings
The present invention is described in further detail with embodiment below in conjunction with the accompanying drawings:
Fig. 1 is the FB(flow block) of the good antifalse label generation method of the invention based on computerized algorithm.
Embodiment
Embodiment is as shown in figure 1, the good antifalse label generation method of the invention based on computerized algorithm comprises the following steps:
Step 1: working out length for the security code of 32 bit bytes according to merchandise news feature and importing computer, the cryptographic Hash of the security code is calculated by computer, the length of cryptographic Hash is 512 bit bytes;
Step 2: cryptographic Hash is split as into 16 × 32 groups of data, every group of data describe two points in drawing area so that it is determined that straight line, a plurality of straight line of 16 × 32 groups of data is drawn in drawing area;
Step 3: computer reads 14 characters that system time obtains system time, the system time includes year, month, day, hour, min, the data of second, to 14 random combination of two of character, obtain X-axis coordinate points and Y-axis coordinate points in drawing area, so as to generate multiple polygon center point coordinates in drawing area, polygonal side number, the length of side and adjacent edge angle are set at random and the plurality of polygon is drawn in drawing area;
Step 4: defining the radius of every straight line and each polygonal color, line width and Intersection Point at random, a width random pattern is generated, computer preserves the random pattern and generates picture file by specified format;
Step 5: picture file inputs print publishing system, antifalsification label is obtained by the printing of print publishing system.
It is preferred that, merchandise news feature includes commodity unique sequence numbers, trade name, commercial specification, manufacturer's information, retailer's information, commodity and traced to the source information and material flow tracking information.
It is preferred that, cryptographic Hash is calculated using MD5 One-way encryption algorithm by computer and obtained.
It is preferred that, the specified format of picture file includes JPG files, PNG files or pdf document.
This method combines the factors such as merchandise news feature and time series, antifalsification label is generated using computerized algorithm, the features such as wherein MD5 One-way encryption algorithm has anti-modification property and strong impact resistant, such as former data are made any change, even only change a byte, resulting cryptographic Hash has very big difference, i.e., from known former data and its cryptographic Hash, wants to find a data with identical cryptographic Hash(That is data falsification)It is extremely difficult, therefore significantly improves the security of antifalsification label and easy to spread.Whether client is consistent with the content of scanning display by scanning the picture on antifalsification label, contrast antifalsification label, prompts for certified products if consistent, and can point out the inquiry times and query time of the antifalsification label;If inconsistent, fake products is prompted for.Meanwhile, the antifalsification label of this method generation can also integrated two-dimensional code, can link corresponding webpage by scanning Quick Response Code, by the related merchandise news feature of web displaying, and merchandise news checking can be carried out by product database, to differentiate commodity true and false.This method simple operation, the antifalsification label of generation cracks difficulty of reproduction greatly, so as to effectively check the fakement phenomena of commodity.