[go: up one dir, main page]

CN103400175B - Pattern identification code processing method and device - Google Patents

Pattern identification code processing method and device Download PDF

Info

Publication number
CN103400175B
CN103400175B CN201310328721.0A CN201310328721A CN103400175B CN 103400175 B CN103400175 B CN 103400175B CN 201310328721 A CN201310328721 A CN 201310328721A CN 103400175 B CN103400175 B CN 103400175B
Authority
CN
China
Prior art keywords
identification code
matrix
subunit
shared information
dimensional data
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
CN201310328721.0A
Other languages
Chinese (zh)
Other versions
CN103400175A (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.)
Beijing Kingsoft Internet Security Software Co Ltd
Conew Network Technology Beijing Co Ltd
Shell Internet Beijing Security Technology Co Ltd
Zhuhai Juntian Electronic Technology Co Ltd
Beijing Kingsoft Internet Science and Technology Co Ltd
Original Assignee
Beijing Kingsoft Internet Security Software Co Ltd
Conew Network Technology Beijing Co Ltd
Shell Internet Beijing Security Technology Co Ltd
Zhuhai Juntian Electronic Technology Co Ltd
Beijing Kingsoft Internet Science and Technology 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 Beijing Kingsoft Internet Security Software Co Ltd, Conew Network Technology Beijing Co Ltd, Shell Internet Beijing Security Technology Co Ltd, Zhuhai Juntian Electronic Technology Co Ltd, Beijing Kingsoft Internet Science and Technology Co Ltd filed Critical Beijing Kingsoft Internet Security Software Co Ltd
Priority to CN201310328721.0A priority Critical patent/CN103400175B/en
Publication of CN103400175A publication Critical patent/CN103400175A/en
Application granted granted Critical
Publication of CN103400175B publication Critical patent/CN103400175B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Editing Of Facsimile Originals (AREA)

Abstract

The method and the device for processing the pattern identification code provided by the embodiment can automatically obtain the identification code identifier to be added according to the shared information, and synthesize the pattern identification code and the identification code identifier into the background picture after the background picture is generated. Therefore, the invention can automatically generate the pattern recognition code with the identification, the distinguishability of using the pattern recognition code is improved, and the user can easily identify the pattern recognition code. Furthermore, because the pattern identification code and the identification code identification in the picture synthesized by the invention are not overlapped, the pattern identification code can not be shielded, and the accuracy of the pattern identification code when being identified is ensured.

Description

图形识别码处理方法及装置Pattern identification code processing method and device

技术领域technical field

本发明涉及图形识别码技术领域,特别是涉及图形识别码处理方法及装置。The invention relates to the technical field of graphic identification codes, in particular to a method and device for processing graphic identification codes.

背景技术Background technique

随着科技的发展,二维码的使用也越来越广泛。我们经常可以在电视画面、印刷品、网页、商品上看到二维码,用户可以使用手机等设备对二维码进行扫描,然后得到相应的信息。With the development of technology, the use of QR codes is becoming more and more widespread. We can often see QR codes on TV screens, printed matter, web pages, and commodities. Users can scan the QR codes with mobile phones and other devices, and then get corresponding information.

用户也可以通过二维码软件将信息转化为二维码并与他人分享。由于可以把网址、文本、图像、声音等信息都转换成二维码并与他人共享,因此用户会经常使用到二维码。当用户需要在短时间内使电子设备生成多个二维码时,用户就无法对生成的多个二维码进行分辨,从而导致二维码的分享出现错误。当然,如果用户需要使用之前在电子设备中生成的某个二维码时,用户需要从历史二维码中进行查找,由于用户同样无法分辨,因此查找困难。在这种情况下,用户可能需要将二维码转化为原始的信息才能获悉是否是自己正在查找的,十分繁琐且浪费了大量时间。Users can also convert information into QR codes through QR code software and share them with others. Because information such as URLs, texts, images, and sounds can be converted into two-dimensional codes and shared with others, users often use two-dimensional codes. When the user needs to make the electronic device generate multiple two-dimensional codes in a short period of time, the user cannot distinguish the multiple generated two-dimensional codes, which leads to errors in sharing the two-dimensional codes. Of course, if the user needs to use a certain QR code generated in the electronic device before, the user needs to search it from the historical QR code, because the user also cannot distinguish it, so the search is difficult. In this case, users may need to convert the QR code into original information to know whether it is what they are looking for, which is very tedious and wastes a lot of time.

当然,一维码,多彩二维码,多维码等图形识别码也同样存在上述问题。Of course, graphic identification codes such as one-dimensional codes, colorful two-dimensional codes, and multi-dimensional codes also have the above-mentioned problems.

发明内容Contents of the invention

本发明实施例的目的在于提供一种图形识别码处理方法及装置,以实现为图形识别码设置标识的目的。The purpose of the embodiments of the present invention is to provide a method and device for processing a pattern identification code, so as to realize the purpose of setting a mark for the pattern identification code.

为达到上述目的,本发明实施例公开了一种图形识别码处理方法,包括:In order to achieve the above purpose, the embodiment of the present invention discloses a method for processing a graphic identification code, including:

获得共享信息及与所述共享信息对应的图形识别码;Obtain shared information and a graphic identification code corresponding to the shared information;

根据所述共享信息获得所要添加的识别码标识;Obtain the identification code to be added according to the shared information;

生成可以覆盖所述图形识别码和所述识别码标识的背景图片;Generate a background image that can cover the graphic identification code and the identification code;

将所述识别码标识和所述图形识别码均合成到所述背景图片中,且使所述识别码标识和所述图形识别码互不重叠,生成具有识别码标识的图形识别码图像。Both the identification code mark and the pattern recognition code are synthesized into the background picture, and the recognition code mark and the pattern recognition code are not overlapped with each other, so as to generate a pattern recognition code image with the recognition code mark.

优选的,所述将所述识别码标识和所述图形识别码均合成到所述背景图片中,且使所述识别码标识和所述图形识别码互不重叠,生成具有识别码标识的图形识别码图像,包括:Preferably, the identification code and the pattern identification code are synthesized into the background picture, and the identification code and the pattern identification code are not overlapped to generate a pattern with the identification code PIN image, including:

将所述图形识别码转化为第一二维数据矩阵,将所述识别码标识转化为第二二维数据矩阵,将所述背景图片转换为第三二维数据矩阵,其中,所述第三二维数据矩阵中包括互不重叠的第一子矩阵和第二子矩阵,所述第一子矩阵的行列数与所述第一二维数据矩阵的行列数相同,所述第二子矩阵的行列数与所述第二二维数据矩阵的行列数相同;converting the graphic identification code into a first two-dimensional data matrix, converting the identification code into a second two-dimensional data matrix, and converting the background image into a third two-dimensional data matrix, wherein the third The two-dimensional data matrix includes a first sub-matrix and a second sub-matrix that do not overlap each other, the number of rows and columns of the first sub-matrix is the same as that of the first two-dimensional data matrix, and the number of rows and columns of the second sub-matrix is the same as that of the first two-dimensional data matrix. The number of rows and columns is the same as the number of rows and columns of the second two-dimensional data matrix;

按照预设的数据替换规则,将所述第一子矩阵中的数据替换为所述第一二维数据矩阵中的数据,将所述第二子矩阵中的数据替换为所述第二二维数据矩阵中的数据,生成第四二维数据矩阵;According to the preset data replacement rules, replace the data in the first sub-matrix with the data in the first two-dimensional data matrix, and replace the data in the second sub-matrix with the second two-dimensional The data in the data matrix generates the fourth two-dimensional data matrix;

将所述第四二维数据矩阵转化为具有识别码标识的图形识别码图像。Converting the fourth two-dimensional data matrix into a graphic identification code image with an identification code mark.

优选的,所述根据所述共享信息获得所要添加的识别码标识,包括:Preferably, the obtaining the identification code to be added according to the shared information includes:

确定所述共享信息的类型;determine the type of information shared;

当确定所述共享信息为网络链接时,访问所述网络链接对应的网页;When it is determined that the shared information is a network link, accessing a web page corresponding to the network link;

从所述网页中获得所述网络链接对应的网站标识;obtaining a website identifier corresponding to the network link from the webpage;

将所述网站标识作为所要添加的识别码标识。The website ID is used as the identification code ID to be added.

优选的,所述根据所述共享信息获得所要添加的识别码标识,包括:Preferably, the obtaining the identification code to be added according to the shared information includes:

确定所述共享信息的类型;determine the type of information shared;

当确定所述共享信息为文本时,按照预设的提取规则,从所述文本中提取字符组;When determining that the shared information is text, extract character groups from the text according to preset extraction rules;

将所提取的字符组作为所要添加的识别码标识。The extracted character group is identified as an identification code to be added.

优选的,所述获得与所述共享信息对应的图形识别码,包括:Preferably, the obtaining the graphic identification code corresponding to the shared information includes:

按照预设的加密算法对所述共享信息进行加密,生成第一加密数据;Encrypting the shared information according to a preset encryption algorithm to generate first encrypted data;

为所述第一加密数据添加加密标识,生成第二加密数据;Adding an encryption identifier to the first encrypted data to generate second encrypted data;

对所述第二加密数据进行编码,生成所要添加标识的图形识别码。The second encrypted data is encoded to generate a graphic identification code to be marked.

一种图形识别码处理装置,包括:第一获得单元、第二获得单元、背景生成单元和合成单元,A pattern identification code processing device, comprising: a first obtaining unit, a second obtaining unit, a background generating unit and a combining unit,

所述第一获得单元,用于获得共享信息及与所述共享信息对应的图形识别码;The first obtaining unit is configured to obtain shared information and a graphic identification code corresponding to the shared information;

所述第二获得单元,用于根据所述共享信息获得所要添加的识别码标识;The second obtaining unit is configured to obtain the identification code to be added according to the shared information;

所述背景生成单元,用于生成可以覆盖所述图形识别码和所述识别码标识的背景图片;The background generating unit is configured to generate a background picture that can cover the graphic identification code and the identification code;

所述合成单元,用于将所述识别码标识和所述图形识别码均合成到所述背景图片中,且使所述识别码标识和所述图形识别码互不重叠,生成具有识别码标识的图形识别码图像。The synthesis unit is used for synthesizing both the identification code mark and the pattern recognition code into the background picture, and making the identification code mark and the pattern recognition code non-overlapping each other to generate a mark with an identification code The PIN image of the .

优选的,所述合成单元包括:矩阵转换子单元、矩阵替换子单元和图片生成子单元,Preferably, the synthesis unit includes: a matrix conversion subunit, a matrix replacement subunit and a picture generation subunit,

所述矩阵转换子单元,用于将所述图形识别码转化为第一二维数据矩阵,将所述识别码标识转化为第二二维数据矩阵,将所述背景图片转换为第三二维数据矩阵,其中,所述第三二维数据矩阵中包括互不重叠的第一子矩阵和第二子矩阵,所述第一子矩阵的行列数与所述第一二维数据矩阵的行列数相同,所述第二子矩阵的行列数与所述第二二维数据矩阵的行列数相同;The matrix conversion subunit is used to convert the graphic identification code into a first two-dimensional data matrix, convert the identification code into a second two-dimensional data matrix, and convert the background image into a third two-dimensional data matrix. A data matrix, wherein the third two-dimensional data matrix includes a first sub-matrix and a second sub-matrix that do not overlap each other, and the number of rows and columns of the first sub-matrix is the same as the number of rows and columns of the first two-dimensional data matrix Same, the number of rows and columns of the second sub-matrix is the same as the number of rows and columns of the second two-dimensional data matrix;

所述矩阵替换子单元,用于按照预设的数据替换规则,将所述第一子矩阵中的数据替换为所述第一二维数据矩阵中的数据,将所述第二子矩阵中的数据替换为所述第二二维数据矩阵中的数据,生成第四二维数据矩阵;The matrix replacement subunit is used to replace the data in the first sub-matrix with the data in the first two-dimensional data matrix according to preset data replacement rules, and replace the data in the second sub-matrix Data is replaced with data in the second two-dimensional data matrix to generate a fourth two-dimensional data matrix;

所述图片生成子单元,用于将所述第四二维数据矩阵转化为具有识别码标识的图形识别码图像。The picture generation subunit is used to transform the fourth two-dimensional data matrix into a graphic identification code image with identification code marks.

优选的,所述第二获得单元,包括:类型确定子单元、网页访问子单元、提取子单元和第一标识子单元,Preferably, the second obtaining unit includes: a type determining subunit, a web page accessing subunit, an extracting subunit and a first identification subunit,

所述类型确定子单元,用于确定所述共享信息的类型;The type determination subunit is configured to determine the type of the shared information;

所述网页访问子单元,用于当确定所述共享信息为网络链接时,访问所述网络链接对应的网页;The webpage access subunit is configured to access a webpage corresponding to the network link when it is determined that the shared information is a network link;

所述提取子单元,用于从所述网页中获得所述网络链接对应的网站标识;The extracting subunit is configured to obtain the website identifier corresponding to the network link from the webpage;

所述第一标识子单元,用于将所述网站标识作为所要添加的识别码标识。The first identification subunit is configured to use the website identification as an identification code to be added.

优选的,所述第二获得单元,包括:类型确定子单元、字符提取子单元和第二标识子单元,Preferably, the second obtaining unit includes: a type determination subunit, a character extraction subunit and a second identification subunit,

所述类型确定子单元,用于确定所述共享信息的类型;The type determination subunit is configured to determine the type of the shared information;

所述字符提取子单元,用于当确定所述共享信息为文本时,按照预设的提取规则,从所述文本中提取字符组;The character extraction subunit is configured to extract character groups from the text according to preset extraction rules when it is determined that the shared information is text;

所述第二标识子单元,用于将所提取的字符组作为所要添加的识别码标识。The second identification subunit is configured to identify the extracted character group as an identification code to be added.

优选的,所述第一获得单元,包括:共享信息子单元、加密子单元、加密标识子单元和编码子单元,Preferably, the first obtaining unit includes: a shared information subunit, an encryption subunit, an encryption identification subunit and an encoding subunit,

所述共享信息子单元,用于获得共享信息;The shared information subunit is used to obtain shared information;

所述加密子单元,用于按照预设的加密算法对所述共享信息进行加密,生成第一加密数据;The encryption subunit is configured to encrypt the shared information according to a preset encryption algorithm to generate first encrypted data;

所述加密标识子单元,用于为所述第一加密数据添加加密标识,生成第二加密数据;The encryption identifier subunit is configured to add an encryption identifier to the first encrypted data to generate second encrypted data;

所述编码子单元,用于对所述第二加密数据进行编码,生成所要添加标识的图形识别码。The encoding subunit is configured to encode the second encrypted data to generate a graphic identification code to be marked.

本实施例提供的一种图形识别码处理方法及装置,可以根据共享信息自动获得所要添加的识别码标识,并在生成背景图片后将图形识别码和识别码标识合成到背景图片中,由于背景图片可以覆盖图形识别码和识别码标识,因此在合成时,可以使图形识别码和识别码标识互不重叠。因此,本发明可以自动生成具有标识的图形识别码,使用图形识别码的可区分性提高,用户容易辨识。进一步,由于本发明合成的图片中图形识别码和识别码标识互不重叠,因此不会对图形识别码造成遮挡,保证了图形识别码在被识别时的识别正确率。当然,实施本发明的任一产品或方法必不一定需要同时达到以上所述的所有优点。A pattern identification code processing method and device provided in this embodiment can automatically obtain the identification code to be added according to the shared information, and synthesize the pattern identification code and the identification code into the background image after the background image is generated. The picture can cover the graphic identification code and the identification code logo, so when compositing, the graphic identification code and the identification code logo can not overlap each other. Therefore, the present invention can automatically generate a graphic identification code with a logo, the distinguishability of the graphic identification code is improved, and the user can easily identify it. Further, since the pattern identification code and the identification code logo do not overlap each other in the picture synthesized by the present invention, the pattern identification code will not be blocked, which ensures the recognition accuracy of the pattern identification code when it is recognized. Of course, implementing any product or method of the present invention does not necessarily need to achieve all the above-mentioned advantages at the same time.

附图说明Description of drawings

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

图1为本发明实施例提供的一种图形识别码处理方法的流程图;Fig. 1 is the flow chart of a kind of pattern identification code processing method provided by the embodiment of the present invention;

图2为本发明实施例提供的一种具有识别码标识的图形识别码图像;Fig. 2 is a kind of pattern identification code image with identification code identification provided by the embodiment of the present invention;

图3为本发明实施例提供的另一种具有识别码标识的图形识别码图像;FIG. 3 is another graphic identification code image with an identification code mark provided by an embodiment of the present invention;

图4为本发明实施例提供的另一种具有识别码标识的图形识别码图像;FIG. 4 is another graphic identification code image with an identification code mark provided by an embodiment of the present invention;

图5为本发明实施例提供的另一种图形识别码处理方法的流程图;FIG. 5 is a flow chart of another pattern identification code processing method provided by an embodiment of the present invention;

图6为本发明实施例提供的一种图形识别码处理装置的结构示意图;FIG. 6 is a schematic structural diagram of a pattern identification code processing device provided by an embodiment of the present invention;

图7为本发明实施例提供的另一种图形识别码处理装置的结构示意图。Fig. 7 is a schematic structural diagram of another pattern identification code processing device provided by an embodiment 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.

如图1所示,本发明实施例提供的一种图形识别码处理方法,可以包括:As shown in Figure 1, a method for processing a graphic identification code provided by an embodiment of the present invention may include:

S100、获得共享信息及与所述共享信息对应的图形识别码;S100. Obtain shared information and a graphic identification code corresponding to the shared information;

具体的,共享信息可以为网络链接、文本、图片、音频等。步骤S100可以首先获得共享信息,然后对共享信息进行编码,将其转换为图形识别码。为了提高信息安全性,可以首先对共享信息进行加密处理,然后转换为图形识别码。步骤S100也可以首先获得图形识别码,然后对图形识别码进行解码,获得共享信息。当图形识别码所携带的共享信息进行了加密时,可以对解码后获得的共享信息进行解密。Specifically, the shared information may be a network link, text, picture, audio, etc. Step S100 may first obtain the shared information, and then encode the shared information to convert it into a graphic identification code. In order to improve information security, the shared information can be encrypted first, and then converted into a graphic identification code. In step S100, the graphic identification code can also be obtained first, and then the graphic identification code can be decoded to obtain the shared information. When the shared information carried by the graphic identification code is encrypted, the shared information obtained after decoding can be decrypted.

其中,图形识别码可以为二维码、一维码、多维码等。Wherein, the graphic identification code may be a two-dimensional code, a one-dimensional code, a multi-dimensional code, and the like.

步骤S100中,获得与所述共享信息对应的图形识别码,可以包括:In step S100, obtaining the graphic identification code corresponding to the shared information may include:

按照预设的加密算法对所述共享信息进行加密,生成第一加密数据;Encrypting the shared information according to a preset encryption algorithm to generate first encrypted data;

为所述第一加密数据添加加密标识,生成第二加密数据;Adding an encryption identifier to the first encrypted data to generate second encrypted data;

对所述第二加密数据进行编码,生成所要添加标识的图形识别码。The second encrypted data is encoded to generate a graphic identification code to be marked.

需要说明的一点是,加密标识的添加,可以使得进行图形识别码解码的设备获悉图形识别码中的信息是否进行了加密,使用了何种加密算法进行了加密。这样进行图形识别码解码的设备就可以顺利的使用相应的解密算法进行解密,以得到共享信息。It should be noted that the addition of the encryption mark can enable the device that decodes the graphic identification code to know whether the information in the graphic identification code is encrypted, and which encryption algorithm is used for encryption. In this way, the device for decoding the graphic identification code can successfully use the corresponding decryption algorithm to decrypt, so as to obtain the shared information.

S200、根据所述共享信息获得所要添加的识别码标识;S200. Obtain an identification code to be added according to the shared information;

其中,当共享信息为网络链接时,识别码标识可以为该网络链接对应的网站标识或网站名称等。可以理解的是,网站标识和网站名称都可以起到对图形识别码的标识作用,可以帮助用户获悉图形识别码对应的共享信息。当共享信息为文本时,可以选择文本中的部分字符作为识别码标识,如文本中的前两个词汇。当共享信息为图片时,可以将图片的缩略图作为识别码的标识。当然,由于共享信息有音频、图片、文本、网络链接等多种不同的类型,因此也可以把共享信息的类型作为识别码标识,同样可以起到标识作用,如当共享信息为音频件时,将“音频”作为识别码标识。Wherein, when the shared information is a network link, the identification code may be the website logo or website name corresponding to the network link. It can be understood that both the website logo and the website name can serve as an identifier for the graphic identification code, and can help users learn the shared information corresponding to the graphic identification code. When the shared information is text, some characters in the text can be selected as identification codes, such as the first two words in the text. When the shared information is a picture, the thumbnail of the picture may be used as the identifier of the identification code. Of course, since the shared information has many different types such as audio, pictures, text, and network links, the type of shared information can also be used as an identification code to identify it, which can also play a role in identifying it. For example, when the shared information is an audio file, Identify "audio" as the identifier.

因此,步骤S200可以包括:Therefore, step S200 may include:

确定所述共享信息的类型;determine the type of information shared;

当确定所述共享信息为网络链接时,访问所述网络链接对应的网页;When it is determined that the shared information is a network link, accessing a webpage corresponding to the network link;

从所述网页中获得所述网络链接对应的网站标识;obtaining a website identifier corresponding to the network link from the webpage;

将所述网站标识作为所要添加的识别码标识。The website ID is used as the identification code ID to be added.

或者,步骤S200可以包括:Alternatively, step S200 may include:

确定所述共享信息的类型;determine the type of information shared;

当确定所述共享信息为文本时,按照预设的提取规则,从所述文本中提取字符组;When determining that the shared information is text, extract character groups from the text according to preset extraction rules;

将所提取的字符组作为所要添加的识别码标识。The extracted character group is identified as an identification code to be added.

其中,该预设的提取规则可以为:按照文字排列顺序从文本开始处提取最前方的一定数量的文字,或提取出现频率最高的文字等。Wherein, the preset extraction rule may be: extracting a certain number of characters at the forefront from the beginning of the text according to the sequence of the characters, or extracting the characters with the highest frequency of occurrence.

S300、生成可以覆盖所述图形识别码和所述识别码标识的背景图片;S300. Generate a background image that can cover the graphic identification code and the identification code;

由于图片一般设置为矩形,因此下面以所有图片均为矩形图片为例对背景图片的尺寸进行说明。Since the pictures are generally set to be rectangular, the size of the background picture will be described below by taking all the pictures as rectangular pictures as an example.

假设图形识别码的长宽分别为L1和D1,识别码标识的长宽分别为L2和D2,那么根据图形识别码和识别码标识的不同摆放位置,可以覆盖它们的背景图片的尺寸可以为图2至图4所示的尺寸。具体的,如图2所示,当图形识别码和识别码标识为上下摆放时,背景图片(也即虚线框)的长宽至少分别为L1和D3,D3=D1+D2。如图3所示,当图形识别码和识别码标识为左右摆放时,背景图片(也即虚线框)的长宽至少分别为L3和D1,L3=L1+L2。如图4所示,当图形识别码和识别码标识为斜向摆放时,背景图片(也即虚线框)的长宽至少分别为L3和D3,L3=L1+L2,D3=D1+D2。Assuming that the length and width of the graphic identification code are L1 and D1 respectively, and the length and width of the identification code logo are L2 and D2 respectively, then according to the different placement positions of the graphic identification code and the identification code logo, the size of the background image that can cover them can be Dimensions shown in Figures 2 to 4. Specifically, as shown in FIG. 2, when the pattern identification code and the identification code mark are placed up and down, the length and width of the background picture (that is, the dotted frame) are at least L1 and D3 respectively, and D3=D1+D2. As shown in FIG. 3 , when the pattern identification code and the identification code mark are placed left and right, the length and width of the background picture (that is, the dotted frame) are at least L3 and D1 respectively, and L3=L1+L2. As shown in Figure 4, when the pattern identification code and the identification code mark are placed obliquely, the length and width of the background picture (that is, the dotted frame) are at least L3 and D3 respectively, L3=L1+L2, D3=D1+D2 .

当然,图2至图4所示三种摆放位置仅仅是本发明的部分摆放位置。图2至图4中背景图片为单一白色图片,在实际应用中还可以设置为其他颜色图片,或多色彩图片。优选的,背景图片对图形识别码的识别不应造成干扰,也不应干扰用户对识别码标识的辨识。图2至图4中,为了便于理解背景图片,使用了虚线框,在实际应用中,可以不存在虚线框。Certainly, the three placement positions shown in FIGS. 2 to 4 are only partial placement positions of the present invention. The background pictures in Figures 2 to 4 are single white pictures, and can also be set as other color pictures or multi-color pictures in practical applications. Preferably, the background image should not interfere with the identification of the graphic identification code, nor should it interfere with the user's identification of the identification code. In FIG. 2 to FIG. 4 , in order to facilitate the understanding of the background image, a dotted frame is used. In practical applications, there may not be a dotted frame.

可以看出,本发明实施例中的图形识别码和识别码标识互不重叠。It can be seen that the pattern identification code and the identification code identification in the embodiment of the present invention do not overlap with each other.

S400、将所述识别码标识和所述图形识别码均合成到所述背景图片中,且使所述识别码标识和所述图形识别码互不重叠,生成具有识别码标识的图形识别码图像。S400. Synthesize both the identification code mark and the pattern recognition code into the background image, and make the recognition code mark and the pattern recognition code non-overlapping each other, and generate a pattern recognition code image with the recognition code mark .

合成后的图像可以参考图2至图4中的图像。The synthesized images can refer to the images in Fig. 2 to Fig. 4 .

本发明实施例提供的一种图形识别码处理方法,可以根据共享信息自动获得所要添加的识别码标识,并在生成背景图片后将图形识别码和识别码标识合成到背景图片中,由于背景图片可以覆盖图形识别码和识别码标识,因此在合成时,可以使图形识别码和识别码标识互不重叠。因此,本发明可以自动生成具有标识的图形识别码,使用图形识别码的可区分性提高,用户容易辨识。进一步,由于本发明合成的图片中图形识别码和识别码标识互不重叠,因此不会对图形识别码造成遮挡,保证了图形识别码在被识别时的识别正确率。A pattern identification code processing method provided by an embodiment of the present invention can automatically obtain the identification code to be added according to the shared information, and synthesize the pattern identification code and the identification code into the background image after the background image is generated. Graphical identification codes and identification code marks can be overlaid, so that the pattern identification codes and identification code marks can not overlap each other during synthesis. Therefore, the present invention can automatically generate a graphic identification code with a logo, the distinguishability of the graphic identification code is improved, and the user can easily identify it. Further, since the pattern identification code and the identification code logo do not overlap each other in the picture synthesized by the present invention, the pattern identification code will not be blocked, which ensures the recognition accuracy of the pattern identification code when it is recognized.

如图5所示,在本发明实施例提供的另一种图形识别码处理方法中,步骤S400可以包括:As shown in FIG. 5, in another method for processing a graphic identification code provided in an embodiment of the present invention, step S400 may include:

S401、将所述图形识别码转化为第一二维数据矩阵,将所述识别码标识转化为第二二维数据矩阵,将所述背景图片转换为第三二维数据矩阵,其中,所述第三二维数据矩阵中包括互不重叠的第一子矩阵和第二子矩阵,所述第一子矩阵的行列数与所述第一二维数据矩阵的行列数相同,所述第二子矩阵的行列数与所述第二二维数据矩阵的行列数相同;S401. Convert the graphic identification code into a first two-dimensional data matrix, convert the identification code into a second two-dimensional data matrix, and convert the background image into a third two-dimensional data matrix, wherein the The third two-dimensional data matrix includes a first sub-matrix and a second sub-matrix that do not overlap each other, the number of rows and columns of the first sub-matrix is the same as the number of rows and columns of the first two-dimensional data matrix, and the second sub-matrix The number of rows and columns of the matrix is the same as the number of rows and columns of the second two-dimensional data matrix;

S402、按照预设的数据替换规则,将所述第一子矩阵中的数据替换为所述第一二维数据矩阵中的数据,将所述第二子矩阵中的数据替换为所述第二二维数据矩阵中的数据,生成第四二维数据矩阵;S402. According to the preset data replacement rules, replace the data in the first sub-matrix with the data in the first two-dimensional data matrix, and replace the data in the second sub-matrix with the second The data in the two-dimensional data matrix generates the fourth two-dimensional data matrix;

可以看出,步骤S401和步骤S402使用矩阵替换的方法来合成图片。可以理解的是,对于计算机来说,平面图片均应转化为二维数据矩阵,然后计算机才能进行识别和操作。每一个矩阵中的数值均代表着图片中相应位置的颜色信息,这样整个矩阵中的数值就组成了一个完整的图片。将矩阵中相应位置的数值修改以后,该数值对应的图片位置的颜色也将发生变化。相应的,对矩阵中的多个数值组成的子矩阵进行修改,将使得该子矩阵对应的图片中的某块区域发生变化。It can be seen that step S401 and step S402 use the method of matrix replacement to synthesize pictures. It is understandable that, for a computer, a plane picture should be transformed into a two-dimensional data matrix, and then the computer can recognize and operate it. The values in each matrix represent the color information of the corresponding position in the picture, so that the values in the entire matrix form a complete picture. After modifying the value of the corresponding position in the matrix, the color of the picture position corresponding to the value will also change. Correspondingly, modifying a sub-matrix composed of multiple values in the matrix will cause a certain area in the picture corresponding to the sub-matrix to change.

S403、将所述第四二维数据矩阵转化为具有识别码标识的图形识别码图像。S403. Convert the fourth two-dimensional data matrix into a graphic identification code image with an identification code mark.

需要说明的一点是,本领域技术人员还可以使用公知的图片合成方法来进行图片合成,本发明在此不作限定。It should be noted that those skilled in the art can also use known image synthesis methods to perform image synthesis, which is not limited in the present invention.

相应于上述方法实施例,如图6所示,本发明还提供了一种图形识别码处理装置,该装置可以包括:第一获得单元100、第二获得单元200、背景生成单元300和合成单元400,Corresponding to the above-mentioned method embodiment, as shown in FIG. 6 , the present invention also provides a graphic identification code processing device, which may include: a first obtaining unit 100, a second obtaining unit 200, a background generating unit 300 and a combining unit 400,

所述第一获得单元100,用于获得共享信息及与所述共享信息对应的图形识别码;The first obtaining unit 100 is configured to obtain shared information and a graphic identification code corresponding to the shared information;

具体的,共享信息可以为网络链接、文本、图片、音频等。第一获得单元100可以首先获得共享信息,然后对共享信息进行编码,将其转换为图形识别码。为了提高信息安全性,可以首先对共享信息进行加密处理,然后转换为图形识别码。第一获得单元100也可以首先获得图形识别码,然后对图形识别码进行解码,获得共享信息。当图形识别码所携带的共享信息进行了加密时,可以对解码后获得的共享信息进行解密。Specifically, the shared information may be a network link, text, picture, audio, etc. The first obtaining unit 100 may first obtain the shared information, and then encode the shared information to convert it into a graphic identification code. In order to improve information security, the shared information can be encrypted first, and then converted into a graphic identification code. The first obtaining unit 100 may also obtain the graphic identification code first, and then decode the graphic identification code to obtain the shared information. When the shared information carried by the graphic identification code is encrypted, the shared information obtained after decoding can be decrypted.

其中,图形识别码可以为二维码、一维码、多维码等。Wherein, the graphic identification code may be a two-dimensional code, a one-dimensional code, a multi-dimensional code, and the like.

其中,第一获得单元100,可以包括:共享信息子单元、加密子单元、加密标识子单元和编码子单元,Wherein, the first obtaining unit 100 may include: a shared information subunit, an encryption subunit, an encryption identification subunit and an encoding subunit,

所述共享信息子单元,用于获得共享信息;The shared information subunit is used to obtain shared information;

所述加密子单元,用于按照预设的加密算法对所述共享信息进行加密,生成第一加密数据;The encryption subunit is configured to encrypt the shared information according to a preset encryption algorithm to generate first encrypted data;

所述加密标识子单元,用于为所述第一加密数据添加加密标识,生成第二加密数据;The encryption identifier subunit is configured to add an encryption identifier to the first encrypted data to generate second encrypted data;

所述编码子单元,用于对所述第二加密数据进行编码,生成所要添加标识的图形识别码。The encoding subunit is configured to encode the second encrypted data to generate a graphic identification code to be marked.

所述第二获得单元200,用于根据所述共享信息获得所要添加的识别码标识;The second obtaining unit 200 is configured to obtain the identification code to be added according to the shared information;

其中,当共享信息为网络链接时,识别码标识可以为该网络链接对应的网站标识或网站名称等。可以理解的是,网站标识和网站名称都可以起到对图形识别码的标识作用,可以帮助用户获悉图形识别码对应的共享信息。当共享信息为文本时,可以选择文本中的部分字符作为识别码标识,如文本中的前两个词汇。当共享信息为图片时,可以将图片的缩略图作为识别码的标识。当然,由于共享信息有音频、图片、文本、网络链接等多种不同的类型,因此也可以把共享信息的类型作为识别码标识,同样可以起到标识作用,如当共享信息为音频件时,将“音频”作为识别码标识。Wherein, when the shared information is a network link, the identification code may be the website logo or website name corresponding to the network link. It can be understood that both the website logo and the website name can serve as an identifier for the graphic identification code, and can help users learn the shared information corresponding to the graphic identification code. When the shared information is text, some characters in the text can be selected as identification codes, such as the first two words in the text. When the shared information is a picture, the thumbnail of the picture may be used as the identifier of the identification code. Of course, since the shared information has many different types such as audio, pictures, text, and network links, the type of shared information can also be used as an identification code to identify it, which can also play a role in identifying it. For example, when the shared information is an audio file, Identify "audio" as the identifier.

其中,第二获得单元200,可以包括:类型确定子单元、网页访问子单元、提取子单元和第一标识子单元,Wherein, the second obtaining unit 200 may include: a type determining subunit, a web page accessing subunit, an extracting subunit and a first identification subunit,

所述类型确定子单元,用于确定所述共享信息的类型;The type determination subunit is configured to determine the type of the shared information;

所述网页访问子单元,用于当确定所述共享信息为网络链接时,访问所述网络链接对应的网页;The webpage access subunit is configured to access a webpage corresponding to the network link when it is determined that the shared information is a network link;

所述提取子单元,用于从所述网页中获得所述网络链接对应的网站标识;The extracting subunit is configured to obtain the website identifier corresponding to the network link from the webpage;

所述第一标识子单元,用于将所述网站标识作为所要添加的识别码标识。The first identification subunit is configured to use the website identification as an identification code to be added.

或者,第二获得单元200,可以包括:类型确定子单元、字符提取子单元和第二标识子单元,Alternatively, the second obtaining unit 200 may include: a type determination subunit, a character extraction subunit and a second identification subunit,

所述类型确定子单元,用于确定所述共享信息的类型;The type determination subunit is configured to determine the type of the shared information;

所述字符提取子单元,用于当确定所述共享信息为文本时,按照预设的提取规则,从所述文本中提取字符组;The character extraction subunit is configured to extract character groups from the text according to preset extraction rules when it is determined that the shared information is text;

所述第二标识子单元,用于将所提取的字符组作为所要添加的识别码标识。The second identification subunit is configured to identify the extracted character group as an identification code to be added.

所述背景生成单元300,用于生成可以覆盖所述图形识别码和所述识别码标识的背景图片;The background generating unit 300 is configured to generate a background picture that can cover the graphic identification code and the identification code;

所述合成单元400,用于将所述识别码标识和所述图形识别码均合成到所述背景图片中,且使所述识别码标识和所述图形识别码互不重叠,生成具有识别码标识的图形识别码图像。The synthesis unit 400 is configured to synthesize both the identification code and the graphic identification code into the background picture, and make the identification code identification and the graphic identification code non-overlapping to generate an identification code The logotype ID image for the logo.

图6所示实施例中各单元的具体执行过程请参见图1所示实施例部分。For the specific execution process of each unit in the embodiment shown in FIG. 6 , please refer to the part of the embodiment shown in FIG. 1 .

本发明实施例提供的一种图形识别码处理装置,可以根据共享信息自动获得所要添加的识别码标识,并在生成背景图片后将图形识别码和识别码标识合成到背景图片中,由于背景图片可以覆盖图形识别码和识别码标识,因此在合成时,可以使图形识别码和识别码标识互不重叠。因此,本发明可以自动生成具有标识的图形识别码,使用图形识别码的可区分性提高,用户容易辨识。进一步,由于本发明合成的图片中图形识别码和识别码标识互不重叠,因此不会对图形识别码造成遮挡,保证了图形识别码在被识别时的识别正确率。A pattern identification code processing device provided in an embodiment of the present invention can automatically obtain the identification code to be added according to the shared information, and synthesize the pattern identification code and the identification code into the background picture after the background picture is generated, because the background picture Graphical identification codes and identification code marks can be overlaid, so that the pattern identification codes and identification code marks can not overlap each other during synthesis. Therefore, the present invention can automatically generate a graphic identification code with a logo, the distinguishability of the graphic identification code is improved, and the user can easily identify it. Further, since the pattern identification code and the identification code logo do not overlap each other in the picture synthesized by the present invention, the pattern identification code will not be blocked, which ensures the recognition accuracy of the pattern identification code when it is recognized.

如图7所示,本发明实施例提供的另一种图形识别码处理装置中,合成单元400可以包括:矩阵转换子单元401、矩阵替换子单元402和图片生成子单元403,As shown in FIG. 7, in another pattern identification code processing device provided by the embodiment of the present invention, the synthesis unit 400 may include: a matrix conversion subunit 401, a matrix replacement subunit 402, and a picture generation subunit 403,

所述矩阵转换子单元401,用于将所述图形识别码转化为第一二维数据矩阵,将所述识别码标识转化为第二二维数据矩阵,将所述背景图片转换为第三二维数据矩阵,其中,所述第三二维数据矩阵中包括互不重叠的第一子矩阵和第二子矩阵,所述第一子矩阵的行列数与所述第一二维数据矩阵的行列数相同,所述第二子矩阵的行列数与所述第二二维数据矩阵的行列数相同;The matrix conversion subunit 401 is used to convert the graphic identification code into a first two-dimensional data matrix, convert the identification code into a second two-dimensional data matrix, and convert the background picture into a third two-dimensional data matrix. A two-dimensional data matrix, wherein, the third two-dimensional data matrix includes a first sub-matrix and a second sub-matrix that do not overlap each other, and the number of rows and columns of the first sub-matrix is the same as the number of rows and columns of the first two-dimensional data matrix The same number, the number of rows and columns of the second sub-matrix is the same as the number of rows and columns of the second two-dimensional data matrix;

所述矩阵替换子单元402,用于按照预设的数据替换规则,将所述第一子矩阵中的数据替换为所述第一二维数据矩阵中的数据,将所述第二子矩阵中的数据替换为所述第二二维数据矩阵中的数据,生成第四二维数据矩阵;The matrix replacement subunit 402 is configured to replace the data in the first sub-matrix with the data in the first two-dimensional data matrix according to preset data replacement rules, and replace the data in the second sub-matrix The data in the second two-dimensional data matrix is replaced with the data in the second two-dimensional data matrix to generate the fourth two-dimensional data matrix;

所述图片生成子单元403,用于将所述第四二维数据矩阵转化为具有识别码标识的图形识别码图像。The image generating subunit 403 is configured to transform the fourth two-dimensional data matrix into a graphic identification code image with an identification code mark.

图7所示实施例中各单元的具体执行过程请参见图5所示实施例部分。For the specific execution process of each unit in the embodiment shown in FIG. 7 , please refer to the part of the embodiment shown in FIG. 5 .

需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。It should be noted that in this article, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply that there is a relationship between these entities or operations. There is no such actual relationship or order between them. Furthermore, the term "comprises", "comprises" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article, or apparatus comprising a set of elements includes not only those elements, but also includes elements not expressly listed. other elements of or also include elements inherent in such a process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article or apparatus comprising said element.

本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。Each embodiment in this specification is described in a related manner, the same and similar parts of each embodiment can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for relevant parts, refer to part of the description of the method embodiment.

以上所述仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。凡在本发明的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本发明的保护范围内。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present invention are included in the protection scope of the present invention.

Claims (4)

1.一种图形识别码处理方法,其特征在于,包括:1. A pattern identification code processing method, characterized in that, comprising: 获得共享信息及与所述共享信息对应的图形识别码;Obtain shared information and a graphic identification code corresponding to the shared information; 根据所述共享信息获得所要添加的识别码标识;Obtain the identification code to be added according to the shared information; 生成可以覆盖所述图形识别码和所述识别码标识的背景图片;其中,所述背景图片为单一白色图片或多色彩图片,所述背景图片对所述图形识别码的识别不应造成干扰,也不应干扰用户对识别码的辨识;Generate a background picture that can cover the pattern identification code and the identification code; wherein, the background picture is a single white picture or a multi-color picture, and the background picture should not cause interference to the identification of the pattern identification code, It should also not interfere with the user's recognition of the identification code; 将所述图形识别码转化为第一二维数据矩阵,将所述识别码标识转化为第二二维数据矩阵,将所述背景图片转换为第三二维数据矩阵,其中,所述第三二维数据矩阵中包括互不重叠的第一子矩阵和第二子矩阵,所述第一子矩阵的行列数与所述第一二维数据矩阵的行列数相同,所述第二子矩阵的行列数与所述第二二维数据矩阵的行列数相同;converting the graphic identification code into a first two-dimensional data matrix, converting the identification code into a second two-dimensional data matrix, and converting the background image into a third two-dimensional data matrix, wherein the third The two-dimensional data matrix includes a first sub-matrix and a second sub-matrix that do not overlap each other, the number of rows and columns of the first sub-matrix is the same as that of the first two-dimensional data matrix, and the number of rows and columns of the second sub-matrix is the same as that of the first two-dimensional data matrix. The number of rows and columns is the same as the number of rows and columns of the second two-dimensional data matrix; 按照预设的数据替换规则,将所述第一子矩阵中的数据替换为所述第一二维数据矩阵中的数据,将所述第二子矩阵中的数据替换为所述第二二维数据矩阵中的数据,生成第四二维数据矩阵;According to the preset data replacement rules, replace the data in the first sub-matrix with the data in the first two-dimensional data matrix, and replace the data in the second sub-matrix with the second two-dimensional The data in the data matrix generates the fourth two-dimensional data matrix; 将所述第四二维数据矩阵转化为具有识别码标识的图形识别码图像;Converting the fourth two-dimensional data matrix into a graphic identification code image with an identification code mark; 其中,所述根据所述共享信息获得所要添加的识别码标识,包括:Wherein, the obtaining the identification code to be added according to the shared information includes: 确定所述共享信息的类型;determine the type of information shared; 当确定所述共享信息为网络链接时,访问所述网络链接对应的网页;When it is determined that the shared information is a network link, accessing a web page corresponding to the network link; 从所述网页中获得所述网络链接对应的网站标识;obtaining a website identifier corresponding to the network link from the webpage; 将所述网站标识作为所要添加的识别码标识;Using the website logo as the identification code to be added; 或者,or, 所述根据所述共享信息获得所要添加的识别码标识,包括:The obtaining the identification code to be added according to the shared information includes: 确定所述共享信息的类型;determine the type of information shared; 当确定所述共享信息为文本时,按照预设的提取规则,从所述文本中提取字符组;When determining that the shared information is text, extract character groups from the text according to preset extraction rules; 将所提取的字符组作为所要添加的识别码标识。The extracted character group is identified as an identification code to be added. 2.根据权利要求1所述的方法,其特征在于,所述获得与所述共享信息对应的图形识别码,包括:2. The method according to claim 1, wherein the obtaining the graphic identification code corresponding to the shared information comprises: 按照预设的加密算法对所述共享信息进行加密,生成第一加密数据;Encrypting the shared information according to a preset encryption algorithm to generate first encrypted data; 为所述第一加密数据添加加密标识,生成第二加密数据;Adding an encryption identifier to the first encrypted data to generate second encrypted data; 对所述第二加密数据进行编码,生成所要添加标识的图形识别码。The second encrypted data is encoded to generate a graphic identification code to be marked. 3.一种图形识别码处理装置,其特征在于,包括:第一获得单元、第二获得单元、背景生成单元和合成单元,3. A pattern identification code processing device, characterized in that, comprising: a first obtaining unit, a second obtaining unit, a background generation unit and a synthesis unit, 所述第一获得单元,用于获得共享信息及与所述共享信息对应的图形识别码;The first obtaining unit is configured to obtain shared information and a graphic identification code corresponding to the shared information; 所述第二获得单元,用于根据所述共享信息获得所要添加的识别码标识;The second obtaining unit is configured to obtain the identification code to be added according to the shared information; 所述背景生成单元,用于生成可以覆盖所述图形识别码和所述识别码标识的背景图片;The background generating unit is configured to generate a background picture that can cover the graphic identification code and the identification code; 所述合成单元,用于将所述识别码标识和所述图形识别码均合成到所述背景图片中,且使所述识别码标识和所述图形识别码互不重叠,生成具有识别码标识的图形识别码图像;其中,所述背景图片为单一白色图片或多色彩图片,所述背景图片对所述图形识别码的识别不应造成干扰,也不应干扰用户对识别码的辨识;The synthesis unit is used for synthesizing both the identification code mark and the pattern recognition code into the background picture, and making the identification code mark and the pattern recognition code non-overlapping each other to generate a mark with an identification code A graphic identification code image; wherein, the background picture is a single white picture or a multi-color picture, and the background picture should not cause interference to the identification of the graphic identification code, nor should it interfere with the user's identification of the identification code; 其中,所述第二获得单元,包括:类型确定子单元、网页访问子单元、提取子单元和第一标识子单元,Wherein, the second obtaining unit includes: a type determining subunit, a web page accessing subunit, an extracting subunit and a first identification subunit, 所述类型确定子单元,用于确定所述共享信息的类型;The type determination subunit is configured to determine the type of the shared information; 所述网页访问子单元,用于当确定所述共享信息为网络链接时,访问所述网络链接对应的网页;The webpage access subunit is configured to access a webpage corresponding to the network link when it is determined that the shared information is a network link; 所述提取子单元,用于从所述网页中获得所述网络链接对应的网站标识;The extracting subunit is configured to obtain the website identifier corresponding to the network link from the webpage; 所述第一标识子单元,用于将所述网站标识作为所要添加的识别码标识;The first identification subunit is used to identify the website identification as the identification code to be added; 或者,or, 所述第二获得单元,包括:类型确定子单元、字符提取子单元和第二标识子单元,The second obtaining unit includes: a type determination subunit, a character extraction subunit and a second identification subunit, 所述类型确定子单元,用于确定所述共享信息的类型;The type determination subunit is configured to determine the type of the shared information; 所述字符提取子单元,用于当确定所述共享信息为文本时,按照预设的提取规则,从所述文本中提取字符组;The character extraction subunit is configured to extract character groups from the text according to preset extraction rules when it is determined that the shared information is text; 所述第二标识子单元,用于将所提取的字符组作为所要添加的识别码标识;The second identification subunit is used to identify the extracted character group as the identification code to be added; 其中,所述合成单元包括:矩阵转换子单元、矩阵替换子单元和图片生成子单元,Wherein, the synthesis unit includes: a matrix conversion subunit, a matrix replacement subunit and a picture generation subunit, 所述矩阵转换子单元,用于将所述图形识别码转化为第一二维数据矩阵,将所述识别码标识转化为第二二维数据矩阵,将所述背景图片转换为第三二维数据矩阵,其中,所述第三二维数据矩阵中包括互不重叠的第一子矩阵和第二子矩阵,所述第一子矩阵的行列数与所述第一二维数据矩阵的行列数相同,所述第二子矩阵的行列数与所述第二二维数据矩阵的行列数相同;The matrix conversion subunit is used to convert the graphic identification code into a first two-dimensional data matrix, convert the identification code into a second two-dimensional data matrix, and convert the background image into a third two-dimensional data matrix. A data matrix, wherein the third two-dimensional data matrix includes a first sub-matrix and a second sub-matrix that do not overlap each other, and the number of rows and columns of the first sub-matrix is the same as the number of rows and columns of the first two-dimensional data matrix Same, the number of rows and columns of the second sub-matrix is the same as the number of rows and columns of the second two-dimensional data matrix; 所述矩阵替换子单元,用于按照预设的数据替换规则,将所述第一子矩阵中的数据替换为所述第一二维数据矩阵中的数据,将所述第二子矩阵中的数据替换为所述第二二维数据矩阵中的数据,生成第四二维数据矩阵;The matrix replacement subunit is used to replace the data in the first sub-matrix with the data in the first two-dimensional data matrix according to preset data replacement rules, and replace the data in the second sub-matrix Data is replaced with data in the second two-dimensional data matrix to generate a fourth two-dimensional data matrix; 所述图片生成子单元,用于将所述第四二维数据矩阵转化为具有识别码标识的图形识别码图像。The picture generation subunit is used to transform the fourth two-dimensional data matrix into a graphic identification code image with identification code marks. 4.根据权利要求3所述的装置,其特征在于,所述第一获得单元,包括:共享信息子单元、加密子单元、加密标识子单元和编码子单元,4. The device according to claim 3, wherein the first obtaining unit comprises: a shared information subunit, an encryption subunit, an encryption identification subunit and an encoding subunit, 所述共享信息子单元,用于获得共享信息;The shared information subunit is used to obtain shared information; 所述加密子单元,用于按照预设的加密算法对所述共享信息进行加密,生成第一加密数据;The encryption subunit is configured to encrypt the shared information according to a preset encryption algorithm to generate first encrypted data; 所述加密标识子单元,用于为所述第一加密数据添加加密标识,生成第二加密数据;The encryption identifier subunit is configured to add an encryption identifier to the first encrypted data to generate second encrypted data; 所述编码子单元,用于对所述第二加密数据进行编码,生成所要添加标识的图形识别码。The encoding subunit is configured to encode the second encrypted data to generate a graphic identification code to be marked.
CN201310328721.0A 2013-07-31 2013-07-31 Pattern identification code processing method and device Expired - Fee Related CN103400175B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310328721.0A CN103400175B (en) 2013-07-31 2013-07-31 Pattern identification code processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310328721.0A CN103400175B (en) 2013-07-31 2013-07-31 Pattern identification code processing method and device

Publications (2)

Publication Number Publication Date
CN103400175A CN103400175A (en) 2013-11-20
CN103400175B true CN103400175B (en) 2017-02-08

Family

ID=49563793

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310328721.0A Expired - Fee Related CN103400175B (en) 2013-07-31 2013-07-31 Pattern identification code processing method and device

Country Status (1)

Country Link
CN (1) CN103400175B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI746882B (en) 2017-03-31 2021-11-21 大陸商騰訊科技(深圳)有限公司 Two-dimensional barcode, printed publication, generating device, and information processing method

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354606A (en) * 2015-09-30 2016-02-24 立德高科(昆山)数码科技有限责任公司 Label formed by two-dimensional code and variable information, generating method and generating system
CN106097882A (en) * 2016-03-25 2016-11-09 立德高科(昆山)数码科技有限责任公司 With interference layer combination mark and generate method with generate system
CN106339436B (en) * 2016-08-19 2020-06-23 维沃移动通信有限公司 Picture-based shopping method and mobile terminal
CN107038387A (en) * 2017-01-04 2017-08-11 阿里巴巴集团控股有限公司 A kind of method for exhibiting data, device and client
CN113033747B (en) * 2021-05-26 2021-07-27 中国工程物理研究院计算机应用研究所 Figure identification code generation method for man-machine identification

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6279830B1 (en) * 1998-09-03 2001-08-28 Denso Corporation Two-dimensional code, reading and producing method and recording medium storing related software
EP1154373A2 (en) * 2000-05-10 2001-11-14 Japan Gain the Summit Co., Ltd. Information code product, manufacturing device and method for manufacturing the same, information code reading device, authentication system, authentication terminal, authentication server, and authentication method
CN1801188A (en) * 2006-01-18 2006-07-12 冯文伦 Matrix type two-dimensional bar code and its encoding and decoding method
CN101770729A (en) * 2008-12-31 2010-07-07 郑阿奇 Two-dimension code anti-counterfeit Internet access product and method thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101464898B (en) * 2009-01-12 2011-09-21 腾讯科技(深圳)有限公司 Method for extracting feature word of text

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6279830B1 (en) * 1998-09-03 2001-08-28 Denso Corporation Two-dimensional code, reading and producing method and recording medium storing related software
EP1154373A2 (en) * 2000-05-10 2001-11-14 Japan Gain the Summit Co., Ltd. Information code product, manufacturing device and method for manufacturing the same, information code reading device, authentication system, authentication terminal, authentication server, and authentication method
CN1801188A (en) * 2006-01-18 2006-07-12 冯文伦 Matrix type two-dimensional bar code and its encoding and decoding method
CN101770729A (en) * 2008-12-31 2010-07-07 郑阿奇 Two-dimension code anti-counterfeit Internet access product and method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
一种个性化二维码自动生成算法;丘文峰,王耀民,赵云;《现代计算机:上半月版》;20120818(第6期);摘要、第1页右栏第2段、第2页右栏第1、9-11段 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI746882B (en) 2017-03-31 2021-11-21 大陸商騰訊科技(深圳)有限公司 Two-dimensional barcode, printed publication, generating device, and information processing method

Also Published As

Publication number Publication date
CN103400175A (en) 2013-11-20

Similar Documents

Publication Publication Date Title
CN103400175B (en) Pattern identification code processing method and device
US10049421B2 (en) Secure content and document watermarking
US9665817B2 (en) Techniques for generating customized two-dimensional barcodes
CN109767375A (en) Method and system for image watermark embedding and tracing
US8677131B2 (en) Method of securing data in 2D bar codes using SSL
WO2020233047A1 (en) Page test method and apparatus
CN111242259B (en) Intelligent anti-counterfeiting code encoding and decoding method and system
CN110245469B (en) Webpage watermark generation method, watermark analysis method, device and storage medium
CN103870583B (en) Relational-database-based online and controllable browsing method for PDF document
Mir Copyright for web content using invisible text watermarking
JPWO2008146392A1 (en) Electronic document encryption system, decryption system, program and method
CN105976005A (en) Two-dimensional code encrypting method, two-dimensional code generating device and two-dimensional code scanning device
Taleby Ahvanooey et al. An innovative technique for web text watermarking (AITW)
CN106599964A (en) Two-dimensional code generation and verification method and device
KR101220254B1 (en) Searchable color encoded file composing method and searchable color encoded file system
CN105184595A (en) Mobile internet big data analysis technique based two-dimension code anti-counterfeiting cloud system and application method thereof
CN105681246A (en) Verification code implementation method
CN110069907A (en) Big data source tracing method and system based on digital watermarking
US9591173B2 (en) System and method for digital analysis of authenticity and integrity of documents using portable devices
Yadav et al. Improved security in the genetic algorithm-based image steganography scheme using Hilbert space-filling curve
TWI518547B (en) Method for generating and displaying a 2d barcode
Chou et al. A Webpage Data Hiding Method by Using Tag and CSS Attribute Setting
JP5907130B2 (en) Information processing device
JP2007096663A (en) Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
CN117436041A (en) Data watermark generation method and device, storage medium and electronic equipment

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20170208

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