Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is only the present invention's part embodiment, rather than whole embodiment.Based on the embodiment in the present invention, those of ordinary skills, not making all other embodiment that obtain under the creative work prerequisite, belong to the scope of protection of the invention.
, for the advantage that makes technical solution of the present invention is clearer, below in conjunction with drawings and Examples, the present invention is elaborated.
Embodiment 1
The embodiment of the present invention provides a kind of data method for anti-counterfeit based on gene word technology, as shown in Figure 1, comprising:
Method flow in the present embodiment can be carried out by encrypting end, and described encryption end comprises computing machine, the server that can adopt gene word technology to be encrypted data.
Step 101, extract the character stream in be-encrypted data.
Wherein, be-encrypted data comprises at least one character stream.
Concrete, in the present embodiment, be-encrypted data can be the various word class documents of encrypting in end that are stored in such as electronic government documents or document, character stream can be a string continuous character in electronic document.For example:
In computing machine, an electronic government documents to be encrypted stores with txt form (can be also the extended formattings such as word, pdf), the content of this electronic government documents has comprised one piece of article, the character stream that extracts of computing machine can be just by every a word at punctuate interval in article, such as: the content of electronic government documents to be encrypted forms " think quiet night " by 20 simplified Hanzis: " the silvery moonlight, cascading to the ground in front of the bed, is just like white frost.Raising my head, I see the moon so bright."; 20 simplified Hanzis have been partitioned into 4 word by 4 punctuation marks; computing machine can by existing character recognition technologies identify these punctuation marks and 4 word that will be partitioned into by punctuation mark as the character stream that extracts, computing machine extracts " I descry bright moonlight before bed ", " being suspected to be frost on the ground ", " raise the head and hope bright moon ", " bow and think native place " these 4 character streams altogether.
Step 102, obtain character to be replaced in current character stream according to default gene word list.
Wherein, the list of gene word is set by the user or by encrypting end, automatically sets, and the list of gene word has comprised part or all of character in the gene character library, and character to be replaced is the character in the character stream identical with the font of character in the list of gene word.Concrete, in the present embodiment, the list of gene word can be character in normal character library and the character list one to one in the gene character library, as shown in Table 1:
Table one
But gene word character be on font with normal character library in the quite similar nuance that exists of character, as in table one, gene word character is many points on font.In actual applications, the variation of gene word character on font can more complicated and almost illegible, at this for illustrative purposes only, does not limit the font of gene character.
Further, in the present embodiment, the particular content of gene word list can by the user or to encrypt end default, and have the gene word list identical with encryption end to the false proof processing in this part electronic document side of carrying out in the equipment that a electronic document is carried out fake certification.Thereby whether the equipment that carries out fake certification exist by checking the gene word that does not belong to this gene word list after can the gene word in finding out electronic document,, if there is the gene word that does not belong to this gene word list, illustrates that this part electronic document forges.
Step 103 is character in the gene character library with described character replacement to be replaced.
For example: according to table one, common character can be the character in normal character library, same word can have multiple font, for example: treat that character to be replaced is in character stream " bed before I descry bright moonlight ": and " bed " (regular script _ GB2312), " bright " (regular script _ GB2312), " moon " (regular script _ GB2312).
Repeating step 102 is to the method flow of step 103, until all character streams that extract from described be-encrypted data have all been completed the method flow of step 102 to step 103.
The data method for anti-counterfeit based on gene word technology that the present embodiment provides, can determine the character that need to replace according to the list of gene word, with respect to of the prior art unique encrypted result that generates by the gene character library, adopt different gene word lists to process be-encrypted data, can generate different encrypted result.If encrypt the gene character library of end by illegal copies, lawless people is due to gene word useless list, can't data falsification, thus the problem that the security of the data that caused by illegal copies because of the gene character library of encrypting end reduces solved in the prior art, thus the security that improves data.
Embodiment 2
The embodiment of the present invention provides a kind of data method for anti-counterfeit based on gene word technology, as shown in Figure 2, comprising:
Method flow in the present embodiment can be carried out by encrypting end, and described encryption end comprises computing machine, the server that can adopt gene word technology to be encrypted data.
Step 201, extract the character stream in be-encrypted data.
Wherein, be-encrypted data comprises at least one character stream.
Step 202, obtain character to be replaced in current character stream according to default gene word list.
Wherein, the list of gene word is set by the user or by encrypting end, automatically sets, and the list of gene word has comprised part or all of character in the gene character library, and character to be replaced is the character in the character stream identical with the font of character in the list of gene word.
Step 203, obtain by user's input or by the automatic character string that generates of described encryption end.
Concrete, in the present embodiment, the encryption end can obtain a character string, and this character string can be inputted to encrypt by the user and hold, or by encrypting to hold, automatically generates or by the encryption end, directly obtained and be pre-stored in the encryption end.This character string can be one section continuous word, symbol, numeral etc., for example: after the character to be replaced in encrypting the character stream of holding in having obtained " think quiet night ", the user can, to the character string " stich " of encrypting end input simplified form of Chinese Character, encrypt end and can carry out successively subsequent treatment to 4 character streams in " think quiet night " according to " stich " this character string.
Step 204, be converted to described character string the character string of binary format according to preset algorithm.
Wherein, the character in the character string of binary format comprises 1 and 0.
Concrete, in the present embodiment, encrypt end and can will input or by the character string that the encryption end generates automatically, be converted to by the user character string of binary format by default algorithm, for example: encrypting end can be with " stich " this character string of user's input, first be converted to ASCII character, again generating the character string of a string binary format according to the character string that is converted to ASCII character by the MD5 algorithm, such as: " 101 ".
Step 205, obtain character to be replaced in current character stream according to default gene word list.
Step 206, be divided into the N group with the character in described current character stream according to the sequencing of arranging.
Wherein, the quantity of the character in the character string of binary format is N, and the quantity of character to be replaced is M.Each quantity of organizing included character to be replaced is the maximum integer less than or equal to M/N, the quantity of the character to be replaced that last group is included is remainder or the M/N of M/N, wherein, character in the character string of binary format is corresponding one by one with each group according to the sequencing of arranging, i.e. the corresponding group of a character in the character string of binary format.
For example: the character string of binary format is " 101 ", N=3; Current character stream is " I descry bright moonlight before bed ", according to table one encrypt end as can be known character to be replaced be: " bed " (regular script _ GB2312), " bright " (regular script _ GB2312), " moon " (regular script _ GB2312), M=3.Above word can be divided into following 3 groups:
First group: bed
Second group: front bright
The 3rd group: month
For each group, the 207 corresponding treatment schemees of taking steps:
Step 207, if the character in the character string of corresponding described binary format is 1, is the character in described gene character library with the character replacement to be replaced in this group.
For example: first group corresponding " 1 " replaces with " bed ` " in the gene character library with " bed (regular script _ GB2312) ".
, if the character in the character string of corresponding described binary format is 0, do not deal with.
For example: second group corresponding " 0 " does not deal with for second group.
The corresponding method flow of repeating step 207, until completed above-mentioned treatment scheme to each group that is marked off by current character stream.
For example: " the front I descry bright moonlight of bed " through step 206 to the corresponding method flow of step 207, what obtain is " bright moon ` light before bed ` ", and wherein, " bed ` " and " month ` " are the gene word in the gene character library.
Repeating step 206 is to the corresponding method flow of step 207, until all character streams that extract from be-encrypted data have all been completed step 206 to the corresponding method flow of step 207.
For example: " quiet night think " after above-mentioned false proof processing, be finally "
Front bright
Light, be suspected to be frost on the ground.Lift
Hope bright
Low
Think native place." wherein, the character in wire frame is the gene word.
the data method for anti-counterfeit based on gene word technology that the present embodiment provides, can determine the character that need to replace according to the list of gene word, because the content of gene word list is default by user or encryption end, encrypting end carries out in false proof processing procedure needing to use the list of gene word to determine the character that needs are replaced to data, the kind of the character of replacing according to different gene word lists and quantity are also different, namely adopt different gene word lists to process be-encrypted data, can cause different encrypted result, and also need in the process of processing be-encrypted data according to user's input or the automatic character string that generates, thereby further increased possible encrypted result.If encrypt the gene character library of end by illegal copies, lawless people is due to gene word useless list and character string, can't data falsification, thus the problem that the security of the data that caused by illegal copies because of the gene character library of encrypting end reduces solved in the prior art, thus the security that improves data.
Embodiment 3
The embodiment of the present invention provides a kind of data false proof device based on gene word technology, as shown in Figure 3, comprising:
Device in the present embodiment can encrypted operation on end, and described encryption end comprises computing machine, the server that can adopt gene word technology to be encrypted data.
Character stream extraction module 31, for the character stream that extracts be-encrypted data.
Wherein, be-encrypted data comprises at least one character stream.
Character screening module 32, be used for obtaining according to default gene word list the character to be replaced that current character flows.
Wherein, the list of gene word is set by the user or by encrypting end, automatically sets, and the list of gene word has comprised part or all of character in described gene character library.
Character replacement module 33, for the character that is the gene character library with described character replacement to be replaced.
The data false proof device based on gene word technology that the present embodiment provides, can screen module by character and determine the character that need to replace according to the list of gene word, with respect to of the prior art unique encrypted result that generates by the gene character library, adopt different gene word lists to process be-encrypted data, can generate different encrypted result.If encrypt the gene character library of end by illegal copies, lawless people is due to gene word useless list, can't data falsification, thus the problem that the security of the data that caused by illegal copies because of the gene character library of encrypting end reduces solved in the prior art, thus the security that improves data.
Embodiment 4
The embodiment of the present invention provides a kind of data false proof device based on gene word technology, as shown in Figure 4, comprising:
Device in the present embodiment can encrypted operation on end, and described encryption end comprises computing machine, the server that can adopt gene word technology to be encrypted data.
Character stream extraction module 41, for the character stream that extracts be-encrypted data.
Wherein, be-encrypted data comprises at least one character stream.
Character screening module 42, be used for obtaining according to default gene word list the character to be replaced that current character flows.
Wherein, the list of gene word is set by the user or by described encryption end, is automatically set, and the list of gene word has comprised part or all of character in the gene character library.
Character string acquisition module 43, be used for before described character replacement to be replaced is the character of gene character library, obtains by user's input or by the automatic character string that generates of described encryption end.
Character string modular converter 44, be used for described character string being converted to the character string of binary format according to preset algorithm after obtaining by user's input or the character string by the automatic generation of described encryption end.
Wherein, the character in the character string of binary format comprises 1 and 0.
Replace determination module 45, be used for according to preset rules, with the character in the character string of described binary format, be the start and stop condition of this character replacement process of character in the gene character library as judging whether to carry out with described character replacement to be replaced, judge and whether need to carry out described character replacement process.
The quantity of the character in the character string of binary format is N, and the quantity of character to be replaced is M, and described replacement determination module 45 comprises:
Grouped element 451, be used for the character of described current character stream is divided into the N group according to the sequencing of arranging, the quantity of the character to be replaced that each group is included is the maximum integer less than or equal to M/N, the quantity of the character to be replaced that last group is included is remainder or the M/N of M/N, wherein, character in the character string of described binary format is corresponding one by one with each group according to the sequencing of arranging, i.e. the corresponding group of a character in the character string of described binary format.
Identifying unit 452, be used for for each group, takes following treatment scheme:
If the character in the character string of corresponding described binary format is 1, the result of judgement is: with the character replacement to be replaced in this group, be character in described gene character library.
If the character in the character string of corresponding described binary format is 0, the result of judgement is: do not deal with.
Repeat above-mentioned treatment scheme, until each group that is marked off by described current character stream has been completed above-mentioned treatment scheme.
Character replacement module 46, for the character that is the gene character library with described character replacement to be replaced.
Wherein, character to be replaced is: the character in the character stream identical with the font of character in the list of gene word.
the data false proof device based on gene word technology that the present embodiment provides, can screen module by character and determine the character that need to replace according to the list of gene word, because the content of gene word list is default by user or encryption end, encrypting end carries out in false proof processing procedure needing to use the list of gene word to determine the character that needs are replaced to data, the kind of the character of replacing according to different gene word lists and quantity are also different, namely adopt different gene word lists to process be-encrypted data, can cause different encrypted result, and process the character string that also needs basis to be obtained by the character string acquisition module in the process of be-encrypted data, thereby further increased possible encrypted result.If encrypt the gene character library of end by illegal copies, lawless people is due to gene word useless list and character string, can't data falsification, thus the problem that the security of the data that caused by illegal copies because of the gene character library of encrypting end reduces solved in the prior art, thus the security that improves data.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in above-described embodiment method, to come the relevant hardware of instruction to complete by computer program, described program can be stored in a computer read/write memory medium, this program when carrying out, can comprise the flow process as the embodiment of above-mentioned each side method.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Acces s Memory, RAM) etc.
The above; be only the specific embodiment of the present invention, but protection scope of the present invention is not limited to this, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement, within all should being encompassed in protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.