[go: up one dir, main page]

CN103390134B - Based on data method for anti-counterfeit and the device of gene word technology - Google Patents

Based on data method for anti-counterfeit and the device of gene word technology Download PDF

Info

Publication number
CN103390134B
CN103390134B CN201210145020.9A CN201210145020A CN103390134B CN 103390134 B CN103390134 B CN 103390134B CN 201210145020 A CN201210145020 A CN 201210145020A CN 103390134 B CN103390134 B CN 103390134B
Authority
CN
China
Prior art keywords
character
gene
word
replaced
string
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN201210145020.9A
Other languages
Chinese (zh)
Other versions
CN103390134A (en
Inventor
郝佳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New Founder Holdings Development Co ltd
Beijing Founder Electronics Co Ltd
Original Assignee
Peking University Founder Group Co Ltd
Beijing Founder Electronics Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Peking University Founder Group Co Ltd, Beijing Founder Electronics Co Ltd filed Critical Peking University Founder Group Co Ltd
Priority to CN201210145020.9A priority Critical patent/CN103390134B/en
Publication of CN103390134A publication Critical patent/CN103390134A/en
Application granted granted Critical
Publication of CN103390134B publication Critical patent/CN103390134B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Document Processing Apparatus (AREA)

Abstract

The embodiment of the invention discloses a kind of data method for anti-counterfeit and device based on gene word technology, relate to data encryption technology field, can in gene word technology, take more complicated anti-fake encrpted process, thereby improve the security of data. Method of the present invention comprises: extract the character stream in be-encrypted data, described be-encrypted data comprises at least one character stream; For each character stream extracting, take following handling process from described be-encrypted data: the character to be replaced in current character stream is obtained in list according to gene word, the list of described gene word has comprised part or all of character in described gene character library; Be the character in gene character library by described character replacement to be replaced; Repeat said process, until all character streams that extract have all been completed to above-mentioned handling process from described be-encrypted data. The present invention is applicable to data to carry out false proof processing.

Description

基于基因字技术的数据防伪方法及装置Data anti-counterfeiting method and device based on genetic word technology

技术领域 technical field

本发明涉及数据加密技术领域,尤其涉及一种基于基因字技术的数据防伪方法及装置The present invention relates to the technical field of data encryption, in particular to a data anti-counterfeiting method and device based on gene word technology

背景技术 Background technique

随着信息技术的不断发展,各个单位或单位内部的各个部门之间的计算机以及服务器等设备都可以通过局域网或万维网互相联结,使得通过网络进行的公文或文档交换特别是电子公文或文档交换日益频繁。为了防止电子公文或文档被恶意窃取或被伪造,需要对电子公文或文档中的数据进行加密或防伪处理,例如:采用数字水印技术进行防伪处理,从而保护电子公文或文档不被伪造。With the continuous development of information technology, computers, servers and other equipment between various units or departments within a unit can be connected to each other through a local area network or the World Wide Web, making the exchange of official documents or documents, especially electronic documents or documents exchange through the network increasingly frequently. In order to prevent electronic documents or documents from being maliciously stolen or forged, it is necessary to encrypt or anti-counterfeit the data in electronic documents or documents, for example: use digital watermarking technology for anti-counterfeiting treatment, so as to protect electronic documents or documents from being forged.

基因字技术是一种近年来新出现的用于电子文档的防伪技术,基因字库是一种专用字库,基因字库中的字符在字形上与正常字库中的字符十分相似但是存在细微差别,并且这些差别凭肉眼难以发觉,需要使用专用程序才能识别出来,并且基因字库中的字符数量和字符种类可以根据需要改变。等于使整个电子文档中的部分或全部字符都充当了防伪标识,没有与加密端相同的基因字库的人很难伪造电子文档。Gene word technology is a new anti-counterfeiting technology for electronic documents that has emerged in recent years. The gene font library is a special font library. The characters in the gene font library are very similar to the characters in the normal font library in shape but there are subtle differences, and these The difference is difficult to detect with the naked eye, and a special program is needed to identify it, and the number and type of characters in the gene font can be changed as needed. It is equivalent to making some or all of the characters in the entire electronic document serve as anti-counterfeiting marks, and it is difficult for people who do not have the same genetic font library as the encrypted side to forge electronic documents.

现有技术的问题在于,随着基因字技术的广泛应用,出现了加密端的基因字库被非法拷贝的问题,不法人员可能会获取加密端的基因字库并使用获取的基因字库伪造电子文档,降低了数据的安全性。The problem with the existing technology is that with the wide application of genetic word technology, the encrypted gene font library has been illegally copied. Unscrupulous people may obtain the encrypted genetic font library and use the obtained genetic font library to forge electronic documents, reducing data security.

发明内容 Contents of the invention

本发明的实施例提供一种基于基因字技术的数据防伪方法及装置,能够在基因字技术中采取更加复杂的防伪加密过程,从而提高数据的安全性。Embodiments of the present invention provide a data anti-counterfeiting method and device based on genetic word technology, which can adopt a more complex anti-counterfeiting encryption process in genetic word technology, thereby improving data security.

为达到上述目的,本发明的实施例采用如下技术方案:In order to achieve the above object, embodiments of the present invention adopt the following technical solutions:

一方面,本发明的实施例提供一种数据防伪方法,该方法基于基因字技术,包括:On the one hand, the embodiments of the present invention provide a data anti-counterfeiting method, the method is based on genetic word technology, including:

提取待加密数据中的字符流,所述待加密数据包括至少一条字符流;Extracting a character stream in the data to be encrypted, the data to be encrypted includes at least one character stream;

对于从所述待加密数据中提取的每一条字符流,采取以下处理流程:For each character stream extracted from the data to be encrypted, the following processing flow is adopted:

根据基因字列表获取当前字符流中的待替换字符,所述基因字列表包括了所述基因字库中的字符的一部分或全部;Obtain the character to be replaced in the current character stream according to the genetic word list, the genetic word list includes a part or all of the characters in the genetic word library;

将所述待替换字符替换为基因字库中的字符;The character to be replaced is replaced with the character in the gene font;

重复上述过程,直至对从所述待加密数据中提取的所有字符流都完成了上述处理流程。The above process is repeated until all the character streams extracted from the data to be encrypted are completed.

另一方面,本发明的实施例提供一种数据防伪装置,该装置基于基因字技术,包括:On the other hand, an embodiment of the present invention provides a data anti-counterfeiting device, which is based on genetic word technology, including:

字符流提取模块,用于提取待加密数据中的字符流,所述待加密数据包括至少一条字符流;A character stream extraction module, configured to extract a character stream in the data to be encrypted, the data to be encrypted includes at least one character stream;

字符筛选模块,用于根据基因字列表获取当前字符流中的待替换字符,所述基因字列表包括了所述基因字库中的字符的一部分或全部;A character screening module, configured to obtain the character to be replaced in the current character stream according to the genetic word list, the genetic word list includes part or all of the characters in the genetic word library;

字符替换模块,用于将所述待替换字符替换为基因字库中的字符。The character replacement module is used to replace the character to be replaced with the character in the gene font.

本发明实施例提供的基于基因字技术的数据防伪方法及装置,能够根据基因字列表确定需要进行替换的字符,由于基因字列表的内容是由用户或加密端预设的,加密端对数据进行防伪处理过程中需要使用基因字列表确定需要替换的字符,根据不同的基因字列表所替换的字符的种类和数量也不同,即采用不同的基因字列表处理待加密数据,会导致不同的加密结果。若加密端的基因字库被非法拷贝,不法人员由于没用基因字列表,则无法伪造数据,从而解决了现有技术中因加密端的基因字库被非法拷贝导致的数据的安全性降低的问题,从而提高数据的安全性。The data anti-counterfeiting method and device based on the gene word technology provided by the embodiments of the present invention can determine the characters that need to be replaced according to the gene word list. Since the content of the gene word list is preset by the user or the encryption end, the encryption end performs data processing In the process of anti-counterfeiting processing, it is necessary to use the genetic word list to determine the characters to be replaced. The types and quantities of characters to be replaced are different according to different genetic word lists. That is, using different genetic word lists to process the data to be encrypted will lead to different encryption results. . If the genetic word library on the encrypted side is illegally copied, the unscrupulous personnel cannot forge the data because the genetic word list is not used, thus solving the problem of reduced data security caused by the illegal copying of the genetic word library on the encrypted side in the prior art, thereby improving Data Security.

附图说明 Description of drawings

为了更清楚地说明本发明实施例中的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其它的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the accompanying drawings that need to be used in the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For Those of ordinary skill in the art can also obtain other drawings based on these drawings without making creative efforts.

图1为本发明实施例1提供的基于基因字技术的数据防伪方法的流程图;Fig. 1 is the flow chart of the data anti-counterfeiting method based on gene word technology that the embodiment 1 of the present invention provides;

图2为本发明实施例2提供的基于基因字技术的数据防伪方法的流程图;Fig. 2 is the flow chart of the data anti-counterfeiting method based on gene word technology that the embodiment of the present invention 2 provides;

图3为本发明实施例3提供的基于基因字技术的数据防伪装置的结构示意图;FIG. 3 is a schematic structural diagram of a data anti-counterfeiting device based on genetic word technology provided in Embodiment 3 of the present invention;

图4为本发明实施例4提供的基于基因字技术的数据防伪方法的结构示意图。FIG. 4 is a schematic structural diagram of a data anti-counterfeiting method based on gene word technology provided by Embodiment 4 of the present invention.

具体实施方式 detailed description

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其它实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only some, not all, embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

为使本发明技术方案的优点更加清楚,下面结合附图和实施例对本发明作详细说明。In order to make the advantages of the technical solution of the present invention clearer, the present invention will be described in detail below in conjunction with the accompanying drawings and embodiments.

实施例1Example 1

本发明实施例提供一种基于基因字技术的数据防伪方法,如图1所示,包括:The embodiment of the present invention provides a data anti-counterfeiting method based on genetic word technology, as shown in Figure 1, including:

本实施例中的方法流程可以由加密端执行,所述加密端包括能够采用基因字技术对数据进行加密的计算机、服务器。The method flow in this embodiment can be executed by the encryption end, and the encryption end includes a computer and a server capable of encrypting data using genetic word technology.

步骤101,提取待加密数据中的字符流。Step 101, extract the character stream in the data to be encrypted.

其中,待加密数据包括至少一条字符流。Wherein, the data to be encrypted includes at least one character stream.

具体的,在本实施例中,待加密数据可以是电子公文或文档等各种储存在加密端中的文字类文档,字符流可以是电子文档中的一串连续的字符。例如:Specifically, in this embodiment, the data to be encrypted may be various text documents stored in the encryption terminal, such as electronic documents or documents, and the character stream may be a series of continuous characters in the electronic document. For example:

在计算机中,一件待加密的电子公文是以txt格式(也可以是word、pdf等其他格式)储存的,该电子公文的内容包括了一篇文章,则计算机所提取的字符流就可以是文章中由标点间隔的每一句话,比如:待加密的电子公文的内容是由20个简体汉字组成的《静夜思》:“床前明月光,疑是地上霜。举头望明月,低头思故乡。”,20个简体汉字由4个标点符号间隔成了4句话,计算机可以通过已有的字符识别技术识别这些标点符号并将由标点符号间隔成的4句话作为提取的字符流,则计算机总共提取“床前明月光”、“疑是地上霜”、“举头望明月”、“低头思故乡”这4个字符流。In the computer, an electronic document to be encrypted is stored in txt format (or other formats such as word, pdf, etc.), and the content of the electronic document includes an article, so the character stream extracted by the computer can be Every sentence in the article is separated by punctuation, for example: the content of the electronic document to be encrypted is "Quiet Night Thoughts" composed of 20 simplified Chinese characters: "The moonlight in front of the bed is suspected to be frost on the ground. Raise your head to look at the bright moon and bow your head to think Hometown.", 20 simplified Chinese characters are divided into 4 sentences by 4 punctuation marks, the computer can recognize these punctuation marks through the existing character recognition technology and use the 4 sentences separated by punctuation marks as the extracted character stream, then The computer extracts a total of 4 character streams: "Moonlight in front of the bed", "Suspected to be frost on the ground", "Looking up at the bright moon", and "Looking down at my hometown".

步骤102,根据预设的基因字列表获取当前字符流中的待替换字符。Step 102, obtain the characters to be replaced in the current character stream according to the preset gene word list.

其中,基因字列表由用户设定或由加密端自动设定,基因字列表包括了基因字库中的字符的一部分或全部,待替换字符为与基因字列表中的字符的字形相同的字符流中的字符。具体的,在本实施例中,基因字列表可以是正常字库中的字符与基因字库中的字符一一对应的列表,如表一所示:Wherein, the gene word list is set by the user or automatically set by the encryption end, the gene word list includes part or all of the characters in the gene word library, and the characters to be replaced are in the character stream with the same font shape as the characters in the gene word list character of. Concretely, in this embodiment, the list of genetic characters can be a list of one-to-one correspondence between the characters in the normal font and the characters in the genetic font, as shown in Table 1:

表一Table I

基因字字符则是在字形上与正常字库中的字符十分相似但是存在细微差别,如表一中,基因字字符在字形上多了一个小点。在实际应用中,基因字字符在字形上的变化可以更加复杂并且难以辨认,在此仅作说明,并不限定基因字符的字形。Genetic characters are very similar to the characters in the normal font library in shape, but there are subtle differences. As shown in Table 1, the genetic character has a small dot in the shape. In practical applications, the variation of the glyph of the genetic character may be more complex and difficult to recognize, and this is only for illustration, and the glyph of the genetic character is not limited.

进一步的,在本实施例中,基因字列表的具体内容可以由用户或加密端预设,并且在对一份电子文档进行防伪验证的设备中存在与对这份电子文档进行方防伪处理的加密端相同的基因字列表。从而进行防伪验证的设备能够在找出电子文档中的基因字后通过验证是否存在不属于该基因字列表的基因字,若存在不属于该基因字列表的基因字,则说明这份电子文档是伪造的。Further, in this embodiment, the specific content of the gene word list can be preset by the user or the encryption terminal, and there is an encryption key for performing anti-counterfeiting processing on this electronic document in the device for anti-counterfeiting verification of an electronic document. A list of gene words with the same end. Therefore, the device for anti-counterfeiting verification can verify whether there is a gene word that does not belong to the gene word list after finding out the gene word in the electronic document. If there is a gene word that does not belong to the gene word list, it means that the electronic document is Forged.

步骤103,将所述待替换字符替换为基因字库中的字符。Step 103, replacing the characters to be replaced with characters in the gene font library.

例如:根据表一,普通字符可以是正常字库中的字符,同一个字可以有多种字体,例如:在字符流“床前明月光”中待待替换字符为:“床”(楷体_GB2312)、“明”(楷体_GB2312)、“月”(楷体_GB2312)。For example: according to Table 1, ordinary characters can be characters in the normal font library, and the same character can have multiple fonts, for example: the character to be replaced in the character stream "Moonlight in front of the bed" is: "bed" (italics_GB2312 ), "Ming" (italics _GB2312), "month" (italics _GB2312).

重复步骤102至步骤103的方法流程,直至对从所述待加密数据中提取的所有字符流都完成了步骤102至步骤103的方法流程。The method flow from step 102 to step 103 is repeated until the method flow from step 102 to step 103 is completed for all character streams extracted from the data to be encrypted.

本实施例提供的基于基因字技术的数据防伪方法,能够根据基因字列表确定需要进行替换的字符,相对于现有技术中的只通过基因字库生成的唯一的加密结果,采用不同的基因字列表处理待加密数据,会生成不同的加密结果。若加密端的基因字库被非法拷贝,不法人员由于没用基因字列表,则无法伪造数据,从而解决了现有技术中因加密端的基因字库被非法拷贝导致的数据的安全性降低的问题,从而提高数据的安全性。The data anti-counterfeiting method based on the genetic word technology provided by this embodiment can determine the characters that need to be replaced according to the genetic word list. Compared with the unique encryption result generated only through the genetic word library in the prior art, a different genetic word list is used. Processing the data to be encrypted will generate different encryption results. If the genetic word library on the encrypted side is illegally copied, the unscrupulous personnel cannot forge the data because the genetic word list is not used, thus solving the problem of reduced data security caused by the illegal copying of the genetic word library on the encrypted side in the prior art, thereby improving Data Security.

实施例2Example 2

本发明实施例提供一种基于基因字技术的数据防伪方法,如图2所示,包括:The embodiment of the present invention provides a data anti-counterfeiting method based on genetic word technology, as shown in Figure 2, including:

本实施例中的方法流程可以由加密端执行,所述加密端包括能够采用基因字技术对数据进行加密的计算机、服务器。The method flow in this embodiment can be executed by the encryption end, and the encryption end includes a computer and a server capable of encrypting data using genetic word technology.

步骤201,提取待加密数据中的字符流。Step 201, extract the character stream in the data to be encrypted.

其中,待加密数据包括至少一条字符流。Wherein, the data to be encrypted includes at least one character stream.

步骤202,根据预设的基因字列表获取当前字符流中的待替换字符。Step 202, obtain the character to be replaced in the current character stream according to the preset gene word list.

其中,基因字列表由用户设定或由加密端自动设定,基因字列表包括了基因字库中的字符的一部分或全部,待替换字符为与基因字列表中的字符的字形相同的字符流中的字符。Wherein, the gene word list is set by the user or automatically set by the encryption end, the gene word list includes part or all of the characters in the gene word library, and the characters to be replaced are in the character stream with the same font shape as the characters in the gene word list character of.

步骤203,获取由用户输入或由所述加密端自动生成的字符串。Step 203, obtaining a character string input by the user or automatically generated by the encryption terminal.

具体的,在本实施例中,加密端可以获取一条字符串,该条字符串可以由用户输入加密端,或由加密端自动生成或由加密端直接获取预存在加密端中的。该字符串可以是一段连续的文字、符号、数字等,例如:在加密端获取了《静夜思》中的字符流中的待替换字符后,用户可以向加密端输入简体中文的字符串“一首诗”,加密端可以根据“一首诗”这个字符串对《静夜思》中的4个字符流依次进行后续处理。Specifically, in this embodiment, the encryption terminal can obtain a character string, which can be input by the user into the encryption terminal, or automatically generated by the encryption terminal, or directly obtained by the encryption terminal and pre-stored in the encryption terminal. The string can be a continuous string of text, symbols, numbers, etc. For example, after the encryption terminal obtains the characters to be replaced in the character stream in "Quiet Night Thoughts", the user can input the simplified Chinese character string "一" to the encryption terminal. The first poem", the encryption end can perform follow-up processing on the four character streams in "Quiet Night Thoughts" according to the string "a poem".

步骤204,将所述字符串根据预设算法转换为二进制格式的字符串。Step 204, converting the character string into a character string in binary format according to a preset algorithm.

其中,二进制格式的字符串中的字符包括1和0。Wherein, the characters in the string in the binary format include 1 and 0.

具体的,在本实施例中,加密端可以通过预设的算法将由用户输入或由加密端自动生成的字符串转换为二进制格式的字符串,例如:加密端可以将用户输入的“一首诗”这个字符串,先转换为ASCII码,在通过MD5算法根据转换为ASCII码的字符串再次生成一串二进制格式的字符串,比如:“101”。Specifically, in this embodiment, the encryption end can convert the character string input by the user or automatically generated by the encryption end into a string in binary format through a preset algorithm, for example: the encryption end can convert the "a poem" input by the user "This character string is first converted to ASCII code, and then a string of strings in binary format is generated again through the MD5 algorithm based on the character string converted to ASCII code, such as: "101".

步骤205,根据预设的基因字列表获取当前字符流中的待替换字符。Step 205, obtain the characters to be replaced in the current character stream according to the preset gene word list.

步骤206,将所述当前字符流中的字符按照排列的先后顺序划分为N组。Step 206, divide the characters in the current character stream into N groups according to the order of arrangement.

其中,二进制格式的字符串中的字符的数量为N,待替换字符的数量为M。则每一组所包括的待替换字符的数量为小于等于M/N的最大整数,最后一组所包括的待替换字符的数量为M/N的余数或M/N,其中,二进制格式的字符串中的字符按照排列的先后顺序与每一组一一对应,即二进制格式的字符串中的一个字符对应一个组。Wherein, the number of characters in the string in binary format is N, and the number of characters to be replaced is M. Then the number of characters to be replaced included in each group is the largest integer less than or equal to M/N, and the number of characters to be replaced included in the last group is the remainder or M/N of M/N, wherein the characters in binary format The characters in the string correspond to each group one by one according to the order of arrangement, that is, one character in the string in binary format corresponds to one group.

例如:二进制格式的字符串为“101”,则N=3;当前字符流为“床前明月光”,根据表一加密端可知待替换字符为:“床”(楷体_GB2312)、“明”(楷体_GB2312)、“月”(楷体_GB2312),则M=3。则可以将以上文字分成如下3组:For example, if the character string in binary format is "101", then N=3; the current character stream is "Moonlight in front of the bed", and according to the encrypted side in Table 1, we can know that the characters to be replaced are: "bed" (italics_GB2312), "明" (italics_GB2312), "month" (italics _GB2312), then M=3. Then the above text can be divided into the following three groups:

第一组:床Group 1: Bed

第二组:前明The second group: Qian Ming

第三组:月The third group: month

对于每一组,采取步骤207所对应的处理流程:For each group, take the processing flow corresponding to step 207:

步骤207,若所对应的所述二进制格式的字符串中的字符为1,则将这一组中的待替换字符替换为所述基因字库中的字符。Step 207, if the corresponding character in the string in the binary format is 1, replace the character to be replaced in this group with the character in the gene font.

例如:第一组对应“1”,则将“床(楷体_GB2312)”替换为基因字库中的“床`”。For example: if the first group corresponds to "1", replace "bed (italics_GB2312)" with "bed`" in the gene font library.

若所对应的所述二进制格式的字符串中的字符为0,则不作处理。If the corresponding character in the string in the binary format is 0, no processing is performed.

例如:第二组对应“0”,则对于第二组不作处理。For example: if the second group corresponds to "0", then the second group will not be processed.

重复步骤207所对应的方法流程,直至对由当前字符流所划分出的每一个组都完成了上述处理流程。The method flow corresponding to step 207 is repeated until the above processing flow is completed for each group divided by the current character stream.

例如:“床前明月光”经过步骤206至步骤207所对应的方法流程后,得到的是“床`前明月`光”,其中,“床`”和“月`”为基因字库中的基因字。For example: "Moonlight in front of the bed" goes through the corresponding method flow from step 206 to step 207, and the result is "moonlight in front of the bed", where "bed" and "month" are the genes in the gene font Character.

重复步骤206至步骤207所对应的方法流程,直至对从待加密数据中提取的所有字符流都完成了步骤206至步骤207所对应的方法流程。The method flow corresponding to step 206 to step 207 is repeated until the method flow corresponding to step 206 to step 207 is completed for all character streams extracted from the data to be encrypted.

例如:《静夜思》经过上述防伪处理后,最终为“前明光,疑是地上霜。举望明思故乡。”其中,线框中的字符为基因字。For example: After the above-mentioned anti-counterfeiting treatment of "Quiet Night Thoughts", it is finally " Former Ming Dynasty Light, suspected to be frost on the ground. raise Wangming Low Miss hometown. "Wherein, the characters in the wireframe are gene words.

本实施例提供的基于基因字技术的数据防伪方法,能够根据基因字列表确定需要进行替换的字符,由于基因字列表的内容是由用户或加密端预设的,加密端对数据进行防伪处理过程中需要使用基因字列表确定需要替换的字符,根据不同的基因字列表所替换的字符的种类和数量也不同,即采用不同的基因字列表处理待加密数据,会导致不同的加密结果,并且处理待加密数据的过程中还需要根据用户输入或自动生成的字符串,从而进一步增加了可能的加密结果。若加密端的基因字库被非法拷贝,不法人员由于没用基因字列表和字符串,则无法伪造数据,从而解决了现有技术中因加密端的基因字库被非法拷贝导致的数据的安全性降低的问题,从而提高数据的安全性。The data anti-counterfeiting method based on the gene word technology provided by this embodiment can determine the characters that need to be replaced according to the gene word list. Since the content of the gene word list is preset by the user or the encryption end, the encryption end performs anti-counterfeiting processing on the data The genetic word list needs to be used to determine the characters to be replaced, and the types and quantities of characters to be replaced are different according to different gene word lists. That is, using different gene word lists to process the data to be encrypted will lead to different encryption results, and In the process of encrypting the data, a character string input by the user or automatically generated is also required, thereby further increasing possible encryption results. If the gene font library on the encryption side is illegally copied, the unscrupulous personnel cannot forge the data because the gene word list and character strings are useless, thus solving the problem of reduced data security caused by the illegal copying of the gene font library on the encryption side in the prior art , thereby improving data security.

实施例3Example 3

本发明实施例提供一种基于基因字技术的数据防伪装置,如图3所示,包括:The embodiment of the present invention provides a data anti-counterfeiting device based on gene word technology, as shown in Figure 3, including:

本实施例中的装置可以在加密端上运行,所述加密端包括能够采用基因字技术对数据进行加密的计算机、服务器。The device in this embodiment can run on the encryption end, and the encryption end includes a computer and a server capable of encrypting data using genetic word technology.

字符流提取模块31,用于提取待加密数据中的字符流。The character stream extraction module 31 is used to extract the character stream in the data to be encrypted.

其中,待加密数据包括至少一条字符流。Wherein, the data to be encrypted includes at least one character stream.

字符筛选模块32,用于根据预设的基因字列表获取当前字符流中的待替换字符。The character screening module 32 is configured to acquire characters to be replaced in the current character stream according to the preset gene word list.

其中,基因字列表由用户设定或由加密端自动设定,基因字列表包括了所述基因字库中的字符的一部分或全部。Wherein, the genetic word list is set by the user or automatically by the encryption end, and the genetic word list includes part or all of the characters in the genetic word library.

字符替换模块33,用于将所述待替换字符替换为基因字库中的字符。A character replacement module 33, configured to replace the characters to be replaced with characters in the gene font.

本实施例提供的基于基因字技术的数据防伪装置,能够通过字符筛选模块根据基因字列表确定需要进行替换的字符,相对于现有技术中的只通过基因字库生成的唯一的加密结果,采用不同的基因字列表处理待加密数据,会生成不同的加密结果。若加密端的基因字库被非法拷贝,不法人员由于没用基因字列表,则无法伪造数据,从而解决了现有技术中因加密端的基因字库被非法拷贝导致的数据的安全性降低的问题,从而提高数据的安全性。The data anti-counterfeiting device based on the gene word technology provided by this embodiment can determine the character to be replaced through the character screening module according to the gene word list. The gene word list processing the data to be encrypted will generate different encryption results. If the genetic word library on the encrypted side is illegally copied, the unscrupulous personnel cannot forge the data because the genetic word list is not used, thus solving the problem of reduced data security caused by the illegal copying of the genetic word library on the encrypted side in the prior art, thereby improving Data Security.

实施例4Example 4

本发明实施例提供一种基于基因字技术的数据防伪装置,如图4所示,包括:The embodiment of the present invention provides a data anti-counterfeiting device based on gene word technology, as shown in Figure 4, including:

本实施例中的装置可以在加密端上运行,所述加密端包括能够采用基因字技术对数据进行加密的计算机、服务器。The device in this embodiment can run on the encryption end, and the encryption end includes a computer and a server capable of encrypting data using genetic word technology.

字符流提取模块41,用于提取待加密数据中的字符流。The character stream extraction module 41 is used to extract the character stream in the data to be encrypted.

其中,待加密数据包括至少一条字符流。Wherein, the data to be encrypted includes at least one character stream.

字符筛选模块42,用于根据预设的基因字列表获取当前字符流中的待替换字符。The character screening module 42 is configured to acquire characters to be replaced in the current character stream according to the preset genetic word list.

其中,基因字列表由用户设定或由所述加密端自动设定,基因字列表包括了基因字库中的字符的一部分或全部。Wherein, the genetic word list is set by the user or automatically by the encryption end, and the genetic word list includes part or all of the characters in the genetic word library.

字符串获取模块43,用于在将所述待替换字符替换为基因字库中的字符之前,获取由用户输入或由所述加密端自动生成的字符串。A character string acquisition module 43, configured to acquire a character string input by the user or automatically generated by the encryption terminal before replacing the character to be replaced with a character in the gene font.

字符串转换模块44,用于在获取由用户输入或由所述加密端自动生成的字符串后,将所述字符串根据预设算法转换为二进制格式的字符串。The character string conversion module 44 is configured to convert the character string into a character string in binary format according to a preset algorithm after obtaining the character string input by the user or automatically generated by the encryption end.

其中,二进制格式的字符串中的字符包括1和0。Wherein, the characters in the string in the binary format include 1 and 0.

替换判定模块45,用于根据预设规则,将所述二进制格式的字符串中的字符,作为判断是否执行将所述待替换字符替换为基因字库中的字符这一字符替换过程的启停条件,判断出是否需要执行所述字符替换过程。The replacement judgment module 45 is used to use the characters in the character string in the binary format as a start-stop condition for judging whether to perform the character replacement process of replacing the characters to be replaced with characters in the gene font library according to preset rules , to determine whether the character replacement process needs to be executed.

二进制格式的字符串中的字符的数量为N,待替换字符的数量为M,所述替换判定模块45包括:The number of characters in the string of binary format is N, the number of characters to be replaced is M, and the replacement judgment module 45 includes:

分组单元451,用于将所述当前字符流中的字符按照排列的先后顺序划分为N组,每一组所包括的待替换字符的数量为小于等于M/N的最大整数,最后一组所包括的待替换字符的数量为M/N的余数或M/N,其中,所述二进制格式的字符串中的字符按照排列的先后顺序与每一组一一对应,即所述二进制格式的字符串中的一个字符对应一个组。The grouping unit 451 is used to divide the characters in the current character stream into N groups according to the order of arrangement, the number of characters to be replaced included in each group is the largest integer less than or equal to M/N, and the last group consists of The number of characters to be replaced is the remainder of M/N or M/N, wherein the characters in the string in the binary format correspond to each group one by one according to the order of arrangement, that is, the characters in the binary format A character in the string corresponds to a group.

判定单元452,用于对于每一组,采取以下处理流程:The judging unit 452 is configured to take the following processing flow for each group:

若所对应的所述二进制格式的字符串中的字符为1,则判断的结果为:将这一组中的待替换字符替换为所述基因字库中的字符。If the corresponding character in the string in the binary format is 1, the judgment result is: replace the character to be replaced in this group with the character in the gene font.

若所对应的所述二进制格式的字符串中的字符为0,则判断的结果为:不作处理。If the corresponding character in the string in the binary format is 0, the judgment result is: no processing.

重复上述处理流程,直至对由所述当前字符流所划分出的每一个组都完成了上述处理流程。The above processing flow is repeated until the above processing flow is completed for each group divided by the current character stream.

字符替换模块46,用于将所述待替换字符替换为基因字库中的字符。A character replacement module 46, configured to replace the character to be replaced with a character in the gene font.

其中,待替换字符为:与基因字列表中的字符的字形相同的字符流中的字符。Wherein, the character to be replaced is: a character in the character stream having the same glyph as the character in the gene word list.

本实施例提供的基于基因字技术的数据防伪装置,能够通过字符筛选模块根据基因字列表确定需要进行替换的字符,由于基因字列表的内容是由用户或加密端预设的,加密端对数据进行防伪处理过程中需要使用基因字列表确定需要替换的字符,根据不同的基因字列表所替换的字符的种类和数量也不同,即采用不同的基因字列表处理待加密数据,会导致不同的加密结果,并且处理待加密数据的过程中还需要根据由字符串获取模块获取的字符串,从而进一步增加了可能的加密结果。若加密端的基因字库被非法拷贝,不法人员由于没用基因字列表和字符串,则无法伪造数据,从而解决了现有技术中因加密端的基因字库被非法拷贝导致的数据的安全性降低的问题,从而提高数据的安全性。The data anti-counterfeiting device based on the gene word technology provided by this embodiment can determine the characters that need to be replaced according to the gene word list through the character screening module. Since the content of the gene word list is preset by the user or the encryption end, the encryption end will be used for the data. In the process of anti-counterfeiting processing, it is necessary to use the genetic word list to determine the characters to be replaced. The types and quantities of characters to be replaced are different according to different genetic word lists. That is, using different genetic word lists to process the data to be encrypted will result in different encryptions. As a result, the process of processing the data to be encrypted still needs to be based on the character string obtained by the character string obtaining module, thereby further increasing the possible encryption results. If the genetic word library on the encrypted side is illegally copied, the unscrupulous personnel cannot forge the data because the genetic word list and character strings are useless, thus solving the problem of reduced data security in the prior art due to the illegal copying of the genetic word library on the encrypted side , thereby improving data security.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-OnlyMemory,ROM)或随机存储记忆体(RandomAccessMemory,RAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented through computer programs to instruct related hardware, and the programs can be stored in a computer-readable storage medium. During execution, it may include the processes of the embodiments of the above-mentioned methods. Wherein, the storage medium may be a magnetic disk, an optical disk, a read-only memory (Read-Only Memory, ROM) or a random access memory (Random Access Memory, RAM) and the like.

以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到的变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应该以权利要求的保护范围为准。The above is only a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Anyone skilled in the art can easily think of changes or substitutions within the technical scope disclosed in the present invention. All should be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be determined by the protection scope of the claims.

Claims (10)

1. a data method for anti-counterfeit, the method, based on gene word technology, is characterized in that, described method byEncrypt end and carry out, described encryption end comprise the computer that can adopt gene word technology to be encrypted data,Server, described method comprises:
Character stream in S1, extraction be-encrypted data, described be-encrypted data comprises at least one character stream;
For each character stream extracting, take following handling process from described be-encrypted data:
S2, obtain the character to be replaced in current character stream, described gene word according to default gene word listList is set by the user or is automatically set by described encryption end, and the list of described gene word has comprised described gene wordPart or all of character in storehouse;
S3, be the character in gene character library by described character replacement to be replaced;
Repeat S2-S3, until all character streams that extract have all been completed from described be-encrypted dataState handling process.
2. data method for anti-counterfeit according to claim 1, is characterized in that, described character to be replaced is:Character in the character stream identical with the font of the character in the list of described gene word.
3. data method for anti-counterfeit according to claim 1, is characterized in that, by described word to be replacedSymbol also comprises before replacing with the character in gene character library:
Obtain the character string of inputting or automatically being generated by described encryption end by user;
According to preset rules, by the character in described character string, carry out described to be replaced as judging whetherWhether character replacement is the start and stop condition of this character replacement process of character in gene character library, judge and needCarry out described character replacement process.
4. data method for anti-counterfeit according to claim 3, is characterized in that, inputs obtaining by userOr after the character string automatically being generated by described encryption end, also comprise:
Described character string is converted to the character string of binary format according to preset algorithm, described binary formatCharacter string in character comprise 1 and 0.
5. data method for anti-counterfeit according to claim 4, is characterized in that, described binary formatThe quantity of the character in character string is N, and the quantity of described character to be replaced is M, described in judge and whether needCarrying out described character replacement process comprises:
Character in described current character stream is divided into N group according to the sequencing of arranging, and each group is includedThe quantity of character to be replaced be the maximum integer that is less than or equal to M/N, last organizes included word to be replacedThe quantity of symbol be M/N remainder or M/N, wherein, the character in the character string of described binary format according toThe sequencing of arranging is corresponding one by one with each group, i.e. a character in the character string of described binary formatA corresponding group;
For each group, take following handling process:
If the character in the character string of corresponding described binary format is 1, the result judging is: by thisCharacter replacement to be replaced in one group is the character in described gene character library;
If the character in the character string of corresponding described binary format is 0, the result judging is: do not doProcess;
Repeat above-mentioned handling process, until each being marked off by described current character stream has been organizedAbove-mentioned handling process.
6. a data false proof device, this device, based on gene word technology, is characterized in that, described device existsEncrypt the upper operation of end, described encryption end comprise the computer that can adopt gene word technology to be encrypted data,Server, comprising:
Character stream extraction module, for extracting the character stream of be-encrypted data, described be-encrypted data comprisesAt least one character stream;
Character screening module, for obtaining the word to be replaced of current character stream according to default gene word listSymbol, the list of described gene word is set by the user or is automatically set by described encryption end, described gene word list bagDraw together part or all of character in described gene character library;
Character replacement module, for the character that is gene character library by described character replacement to be replaced.
7. data false proof device according to claim 6, is characterized in that, described character to be replaced is:Character in the character stream identical with the font of the character in the list of described gene word.
8. data false proof device according to claim 6, is characterized in that, also comprises:
Character string acquisition module, for before described character replacement to be replaced is the character of gene character library,Obtain the character string of inputting or automatically being generated by described encryption end by user;
Replace determination module, for according to preset rules, by the character in described character string, as judgement beNo execution is the start and stop bar of this character replacement process of character in gene character library by described character replacement to be replacedPart, judges and whether needs to carry out described character replacement process.
9. data false proof device according to claim 8, is characterized in that, also comprises:
Character string modular converter, for obtaining the character of being inputted or automatically being generated by described encryption end by userAfter string, described character string is converted to the character string of binary format according to preset algorithm, described binary system latticeCharacter in the character string of formula comprises 1 and 0;
Described replacement determination module, also for according to preset rules, by the character string of described binary formatCharacter, as judge whether carry out be this word of character in gene character library by described character replacement to be replacedThe start and stop condition of symbol replacement process, judges and whether needs to carry out described character replacement process.
10. data false proof device according to claim 9, is characterized in that, described binary formatThe quantity of the character in character string is N, and the quantity of described character to be replaced is M, described replacement determination module bagDraw together:
Grouped element, for being divided into N by the character of described current character stream according to the sequencing of arrangingGroup, each quantity of organizing included character to be replaced is the maximum integer that is less than or equal to M/N, last groupThe quantity of included character to be replaced is remainder or the M/N of M/N, wherein, and the word of described binary formatCharacter in symbol string is corresponding one by one with each group according to the sequencing of arranging, i.e. the word of described binary formatThe corresponding group of a character in symbol string;
Identifying unit, for for each group, take following handling process:
If the character in the character string of corresponding described binary format is 1, the result judging is: by thisCharacter replacement to be replaced in one group is the character in described gene character library;
If the character in the character string of corresponding described binary format is 0, the result judging is: do not doProcess;
Repeat above-mentioned handling process, until each being marked off by described current character stream has been organizedAbove-mentioned handling process.
CN201210145020.9A 2012-05-10 2012-05-10 Based on data method for anti-counterfeit and the device of gene word technology Expired - Fee Related CN103390134B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210145020.9A CN103390134B (en) 2012-05-10 2012-05-10 Based on data method for anti-counterfeit and the device of gene word technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210145020.9A CN103390134B (en) 2012-05-10 2012-05-10 Based on data method for anti-counterfeit and the device of gene word technology

Publications (2)

Publication Number Publication Date
CN103390134A CN103390134A (en) 2013-11-13
CN103390134B true CN103390134B (en) 2016-05-11

Family

ID=49534403

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210145020.9A Expired - Fee Related CN103390134B (en) 2012-05-10 2012-05-10 Based on data method for anti-counterfeit and the device of gene word technology

Country Status (1)

Country Link
CN (1) CN103390134B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1588351A (en) * 2004-08-27 2005-03-02 北京北大方正电子有限公司 Method for encrypting and discriminating real and false for electronic document or file
CN1790420A (en) * 2005-12-01 2006-06-21 北京北大方正电子有限公司 Method and apparatus for embedding and detecting digital watermark in text file
CN1933391A (en) * 2005-09-16 2007-03-21 北京书生国际信息技术有限公司 Hidden code inserting and detecting method
US7403657B2 (en) * 2001-03-22 2008-07-22 Hitachi, Ltd. Method and apparatus for character string search in image
CN101853313A (en) * 2010-07-01 2010-10-06 无锡骏聿科技有限公司 Handwriting font object library generating method based on font categorization

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7191252B2 (en) * 2000-11-13 2007-03-13 Digital Doors, Inc. Data security system and method adjunct to e-mail, browser or telecom program

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7403657B2 (en) * 2001-03-22 2008-07-22 Hitachi, Ltd. Method and apparatus for character string search in image
CN1588351A (en) * 2004-08-27 2005-03-02 北京北大方正电子有限公司 Method for encrypting and discriminating real and false for electronic document or file
CN1933391A (en) * 2005-09-16 2007-03-21 北京书生国际信息技术有限公司 Hidden code inserting and detecting method
CN1790420A (en) * 2005-12-01 2006-06-21 北京北大方正电子有限公司 Method and apparatus for embedding and detecting digital watermark in text file
CN101853313A (en) * 2010-07-01 2010-10-06 无锡骏聿科技有限公司 Handwriting font object library generating method based on font categorization

Also Published As

Publication number Publication date
CN103390134A (en) 2013-11-13

Similar Documents

Publication Publication Date Title
CN107301244B (en) Method, apparatus, system and the trade mark memory of a kind of trade mark point card processing
Hakak et al. Approaches for preserving content integrity of sensitive online Arabic content: A survey and research challenges
Shirali-Shahreza et al. A new synonym text steganography
Shirali-Shahreza Text steganography by changing words spelling
Xiang et al. Linguistic steganalysis using the features derived from synonym frequency
CN103761459B (en) A kind of document multiple digital watermarking embedding, extracting method and device
Taleby Ahvanooey et al. An innovative technique for web text watermarking (AITW)
Yang et al. TS-CNN: Text steganalysis from semantic space based on convolutional neural network
CN105824825B (en) A sensitive data identification method and device
Baawi et al. A comparative study on the advancement of text steganography techniques in digital media
CN105095699A (en) Watermark information embedding method and device, and watermark information decoding method
Al-Wesabi A Smart English Text Zero-Watermarking Approach Based on Third-Level Order and Word Mechanism of Markov Model.
Singh et al. A survey on text based steganography
Alkhafaji et al. Payload capacity scheme for quran text watermarking based on vowels with kashida
Hilal et al. A hybrid intelligent text watermarking and natural language processing approach for transferring and receiving an authentic english text via internet
Al-Wesabi et al. A Reliable NLP Scheme for English Text Watermarking Based on Contents Interrelationship.
CN102682248B (en) Watermark embedding and extracting method for ultrashort Chinese text
CN108932434B (en) Data encryption method and device based on machine learning technology
CN100353279C (en) A file enciphering method
Ba-Alwi et al. Content authentication of English text via internet using zero watermarking technique and Markov model
JP5928733B2 (en) Method for automatically generating test data consisting of character strings, method for identifying signatures embedded in test data consisting of character strings, and their computers and computer programs
Chaudhary et al. Text steganography based on feature coding method
Ghilan et al. Combined Markov model and zero watermarking techniques to enhance content authentication of English text documents
Alginahi et al. A zero-watermarking verification approach for Quranic verses in online text documents
Kamaruddin et al. Associated diacritical watermarking approach to protect sensitive arabic digital texts

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20220624

Address after: 3007, Hengqin international financial center building, No. 58, Huajin street, Hengqin new area, Zhuhai, Guangdong 519031

Patentee after: New founder holdings development Co.,Ltd.

Patentee after: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

Address before: 100871, Beijing, Haidian District Cheng Fu Road 298, founder building, 5 floor

Patentee before: PEKING UNIVERSITY FOUNDER GROUP Co.,Ltd.

Patentee before: BEIJING FOUNDER ELECTRONICS Co.,Ltd.

CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20160511