Summary of the invention
Technical problem to be solved by this invention is: for above-mentioned the deficiencies in the prior art, provide a kind of and can identify the intelligent film printer of film and the method for identification film, this intelligent film printer can Intelligent Recognition legal film (being effective film), personation film (being invalid film) refusal is printed and alarm, reached and prevent that film is by the object of bootlegging with this.
Want in order to solve the problems of the technologies described above, the technical solution adopted in the present invention is: a kind of intelligent film printer that can identify film, the film printer that it comprises printing film, is characterized in: also comprise film, scan module and the deciphering module of printing the label that has tape label information, this label is coding generation again after utilizing computer to adopt DES algorithm to be encrypted the film original information data of input, this scan module is connected with deciphering module by serial communication bus, so that this scan module is passed to deciphering module by serial communication bus after the label information of encrypting on film is scanned, this deciphering module is connected with described film printer by control signal wire, so that deciphering module adopts DES algorithm, to label information, deciphering obtains film original information data, and the signal after film validity being detected according to this film original information data is passed to film printer.
The method of above-mentioned intelligent film printer identification film, step is as follows:
A, utilize computer to adopt DES algorithm to be encrypted the film original information data of input, re-use label and generate software the film original information data after encrypting is encoded into the label of tape label information; This label information comprises printer numbering, film manufacturer numbering, film production batch number, this batch of total number of film, film sequence number;
B, with label machine by the label printing generating to nonprinting region position on film;
C, scan module scan the label information on film, and label information after encryption scanning being obtained by serial communication bus is passed to deciphering module;
D, deciphering module adopt DES algorithm to be decrypted and to obtain film original information data the label information of encrypting, then according to film original information data, film validity are detected, and the signal after detecting is passed to film printer.
Above-mentioned deciphering module is as follows to the step of film validation checking:
A, judge that whether built-in with deciphering module printer in film numbering curing printer numbering be identical, if different, proceed to step F; If identical, proceed to step B;
B, judge that whether the film production batch number in film equals the internal pair production batch number of deciphering module, if be less than, proceeds to step F; If equaled, proceed to step C; If be greater than, using this film production batch number internal pair production batch number new in deciphering module, and proceed to step D after solidifying preservation;
C, judge that whether the inside film print count value of deciphering module equals this batch of total number of film in film, if be greater than, proceeds to step F; If equaled, this film production batch number is added 1 in deciphering module new internal pair production batch number, and solidify after preserving and proceed to step D; If be less than, inner film print count value added to 1 and also after curing preservation, proceed to step e;
D, by the zero clearing of inner film print count value, and solidify preserve after proceed to step e;
E, film are effective, and film validation checking finishes;
F, film are invalid, and film validation checking finishes.
Above-mentioned label is bar code or Quick Response Code, corresponding, and above-mentioned scan module is bar code scan module or Quick Response Code scan module, with binary data output information that bar code or Quick Response Code figure are scanned and decoded.
Above-mentioned film printer can be ink-jet printer or laser printer.
So; this intelligent film printer can Intelligent Recognition legal film (being effective film); personation film (being invalid film) refusal is printed and alarm; thereby can carry out Intelligent Recognition to being printed film; make film have antiforge function, prevent that film is by unauthorized copying, the present invention can effectively prevent that fake and forged film from causing damage to patient's rights and interests; the legitimate rights and interests of simultaneously also having protected regular film producer, have very high practicality and are easy to and realize.
Detailed description of the invention
As shown in Figure 1 to Figure 3, the present invention is a kind of intelligent film printer that can identify film, and it comprises film, scan module 1, deciphering module 2 and film printer 3; This scan module 1 is connected with deciphering module 2 by serial communication bus, and this deciphering module 2 is connected with this film printer 3 by control signal wire, wherein:
On this film, print the label that has tape label information, referring to Fig. 2, this label is to go up the film original information data of input (as printer numbering at computer (as PC computer), film manufacturer numbering, film production batch number, this batch of total number of film and film sequence number etc.) adopt DES data algorithm to be encrypted after, again the film original information data after encrypting is carried out to barcode encoding or Quick Response Code coding, and export bar code or Quick Response Code figure, be that generating labels (adopts label to generate Software Create, for prior art, do not repeat them here), label is now with the label information after encrypting, label information is exactly film original information data.Then, the label of generation prints to the position (referring to the position outside film surrounding frame, not affect actual print What as principle) of nonprinting region on film by label machine (can adopt existing conventional label machine).
This scan module 1 is bar code scan module (as LV12 scan module) or Quick Response Code scan module (as LV3000 Quick Response Code scan module), with binary data output information that bar code or Quick Response Code figure are scanned and decoded.Referring to Fig. 3, this scan module 1 is that the label information of encrypting on film carries out scan decoder to the label on film, converts the bar code of scanning or Quick Response Code (label information of encrypting) to numerical data, passes to deciphering module by serial communication bus; This deciphering module 2(hardware is as ATMEGA128 single-chip microcomputer, and the scan module in literary composition and the hardware of deciphering module have just exemplified a feasible embodiment, but not as limit.) data that scan module 1 is converted are decrypted, be that deciphering module adopts DES algorithm to obtain film original information data to the label information deciphering of encrypting, and according to this film original information data, film validity is detected, again the signal after detecting is passed to film printer (ink-jet printer or laser printer), signal after detection is: in the time that film is effective, 2 of deciphering modules send print signal to film printer 3 and print; When film is invalid, 2 of deciphering modules send and stop print command and scarce paper signal to film printer, and non-print machine is printed, and sends buzzing alarm call simultaneously.
The method of intelligent film printer identification film of the present invention, its concrete steps are as follows:
A, at the upper input of computer (as PC computer) film original information data, adopt DES algorithm to be encrypted, re-using label generates software the film original information data after encrypting (comprising printer numbering, film manufacturer numbering, film production batch number, this batch of total number of film and film sequence number etc.) is carried out to barcode encoding or Quick Response Code coding, and export bar code or Quick Response Code figure, be encoded into the label of the label information of band encryption; The content of this label information is the content of film original information data, referring to Fig. 2;
B, with label machine by the label printing generating to nonprinting region position on film, be generally the position outside film surrounding frame, not affect actual print What as principle, facilitate scan module scanning;
The label information of encrypting on film is carried out scan decoder by C, scan module, by the bar code of scanning or the Quick Response Code (label information after encrypting, or film original information data after claiming to encrypt) convert numerical data to, and the label information of encryption scanning being obtained by serial communication bus passes to deciphering module, referring to Fig. 3;
D, deciphering module are decrypted and obtain film original information data the label information of encrypting with DES algorithm the data acquisition receiving, and according to this film original information data, film validity is detected, in the time that film is effective, deciphering module sends print signal to film printer and prints; When film is invalid, deciphering module sends and stops print command and scarce paper signal to film printer, and non-print machine is printed, and buzzer sends buzzing alarm call simultaneously, referring to Fig. 3.
So, first film in film detects that signal after finishing sends to that printer prints or is non-print in batch, again to next film in this batch of film scan, deciphering, validation checking, printing or non-print, complete whole identification to this batch of film according to this and print, then enter the identification printing of next group film.
This deciphering module is as follows to the step of film validation checking in batch, in conjunction with referring to Fig. 4:
A, judging whether built-in with the deciphering module printer numbering of printer in film numbering, identical (the built-in printer numbering of deciphering module is curing in the software of deciphering module, the numbering that is every printer has been solidified and has been stored in the software of deciphering module in the time dispatching from the factory production), if different, proceed to step F; If identical, proceed to step B;
B, judge that whether the film production batch number in film equals the internal pair production batch number of deciphering module, if be less than, proceeds to step F; If equaled, proceed to step C; If be greater than, using this film production batch number internal pair production batch number new in deciphering module, and proceed to step D after solidifying preservation;
C, judge that whether the inside film print count value of deciphering module equals this batch of total number of film in film, if be greater than, proceeds to step F; If equaled, this film production batch number is added 1 in deciphering module new internal pair production batch number, and solidify after preserving and proceed to step D; If be less than, inner film print count value added to 1 and also after curing preservation, proceed to step e;
D, by the zero clearing of inner film print count value, and solidify preserve after proceed to step e;
E, film are effective, and film validation checking finishes;
F, film are invalid, and film validation checking finishes.
When detection, owing to there being this batch of total number of film in the label information on each film, film of the every printing of printer, deciphering module just counts in inside and count value is cured, can power down preserve, in the time that count value equals this batch of total number of film in label, this batch of film all detects as effective film, and printed, just no longer print.What print is exactly the film of new lot again, the counting again of starting from scratch.
So, can prevent from not having bar code or Quick Response Code figure on people's duplicate film of scheming, if copied a collection ofly, can only be also to use that batch, and one of that batch is finished, just film has ceased to be in force automatically.