Movatterモバイル変換


[0]ホーム

URL:


CN115456124A - Method, system, equipment and storage medium for generating stacked three-dimensional code - Google Patents

Method, system, equipment and storage medium for generating stacked three-dimensional code
Download PDF

Info

Publication number
CN115456124A
CN115456124ACN202211103553.0ACN202211103553ACN115456124ACN 115456124 ACN115456124 ACN 115456124ACN 202211103553 ACN202211103553 ACN 202211103553ACN 115456124 ACN115456124 ACN 115456124A
Authority
CN
China
Prior art keywords
code
area
dot matrix
dimensional
generated
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.)
Pending
Application number
CN202211103553.0A
Other languages
Chinese (zh)
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.)
Cn3wm Xiamen Network Technology Co ltd
Original Assignee
Cn3wm Xiamen Network 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 Cn3wm Xiamen Network Technology Co ltdfiledCriticalCn3wm Xiamen Network Technology Co ltd
Priority to CN202211103553.0ApriorityCriticalpatent/CN115456124A/en
Publication of CN115456124ApublicationCriticalpatent/CN115456124A/en
Pendinglegal-statusCriticalCurrent

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明涉及一种堆叠三维码的生成方法,包括以下步骤:确定堆叠三维码的生成样式,所述生成样式为预先设定的二维码及点阵码在显示区域内的分布样式;获取印刷载体上设计的码区显示尺寸数据;根据所述码区显示尺寸数据以及确定的生成样式,分别计算二维码和点阵码的尺寸数据和生成区域;获取二维码的生码数据和点阵码的生码数据;根据二维码的生码数据和尺寸数据生成对应尺寸的二维码,根据点阵码的生码数据和尺寸数据生成对应尺寸的点阵码;根据二维码和点阵码的生成区域将生成的二维码和点阵码填充至对应的生成区域并进行融合,完成融合后输出为堆叠三维码图。

Figure 202211103553

The invention relates to a method for generating a stacked three-dimensional code, comprising the following steps: determining the generation pattern of the stacked three-dimensional code, the generation pattern being the distribution pattern of the preset two-dimensional code and dot matrix code in the display area; obtaining the printed The code area designed on the carrier displays size data; according to the size data displayed in the code area and the determined generation style, the size data and generation area of the two-dimensional code and the dot matrix code are respectively calculated; the raw code data and points of the two-dimensional code are obtained The raw code data of the matrix code; generate a two-dimensional code of the corresponding size according to the raw code data and size data of the two-dimensional code, and generate a dot matrix code of the corresponding size according to the raw code data and size data of the dot matrix code; according to the two-dimensional code and the size data In the generation area of the dot matrix code, the generated two-dimensional code and dot matrix code are filled into the corresponding generation area and fused. After the fusion is completed, the output is a stacked 3D code map.

Figure 202211103553

Description

Translated fromChinese
一种堆叠三维码的生成方法、系统、设备和存储介质Method, system, device and storage medium for generating a stacked three-dimensional code

技术领域technical field

本发明涉及一种堆叠三维码的生成方法、系统、设备和存储介质,属于编码符号处理技术领域。The invention relates to a method, system, device and storage medium for generating stacked three-dimensional codes, and belongs to the technical field of coding symbol processing.

背景技术Background technique

随着二维码应用越来越广泛,现在无论是商品包装还是产品防伪溯源都出现了二维码的应用。在商品包装中,通过给产品赋码,可让用户扫码了解产品的详细信息,让用户进一步了解产品的优势,从而达到一定的营销效果;同时也可让用户扫码通过后台查询验证所购买商品的真伪。As the application of two-dimensional codes becomes more and more widespread, the application of two-dimensional codes has appeared in both commodity packaging and product anti-counterfeiting traceability. In the product packaging, by assigning a code to the product, users can scan the code to understand the detailed information of the product, so that users can further understand the advantages of the product, so as to achieve a certain marketing effect; at the same time, users can also scan the code to verify the purchase through the background query The authenticity of the product.

二维码虽然在商品流通和防伪溯源领域得到了广泛的应用,但由于其自身缺陷带来了一些无法解决的问题,一是二维码由黑白块组成,人眼不容易辨识其内容,所以容易被篡改和替换,从而给不法分子带来可趁之机;二是二维码的防伪溯源通常要结合后端系统,而后端系统也容易被伪造,所以通过该种方式的防伪仍存在不可信因素;三是二维码虽然有一定的容错能力,但容易遭到污损破坏从而无法识别,从而给防伪溯源工作带来一定难度。Although the two-dimensional code has been widely used in the field of commodity circulation and anti-counterfeiting traceability, it has brought some unsolvable problems due to its own defects. It is easy to be tampered with and replaced, which brings opportunities for criminals; second, the anti-counterfeiting traceability of the two-dimensional code usually needs to be combined with the back-end system, and the back-end system is also easy to be forged, so the anti-counterfeiting through this method still exists. The third is that although the two-dimensional code has a certain fault tolerance, it is easy to be defaced and damaged and cannot be recognized, which brings certain difficulties to the work of anti-counterfeiting and traceability.

为了解决上述技术问题,专利号为“CN103489026B”公开了一种彩色二维码及其生成方法,具体公开了以下技术方案:“S1、基于第一目标物信息生成原始二维码,在所述原始二维码的部分或者全部区域填充颜色;S2、基于第二目标物信息生成点阵码;S3、将生成的点阵码叠加到填充了颜色的原始二维码的部分或者全部区域,以生成彩色二维码,通过在填充了颜色的原始二维码的部分或者全部区域叠加点阵码从而生成最终的彩色二维码,进一步提高了整体的编码密度,加密性强,提高了破解和仿造的难度。另外,基于第一目标物信息计算预定个数的颜色代码,然后按照填充顺序将预定个数的颜色代码分别填充到原始二维码被划分出的预定个数的区域中,从而生成了颜色按照一定逻辑变化的二维码。”In order to solve the above technical problems, the patent No. "CN103489026B" discloses a color two-dimensional code and its generation method, and specifically discloses the following technical solutions: "S1. Generate the original two-dimensional code based on the information of the first object, in the Part or all of the original two-dimensional code is filled with color; S2, generating a dot matrix code based on the second target information; S3, superimposing the generated dot matrix code on part or all of the original two-dimensional code filled with color, to Generate a color two-dimensional code, and generate the final color two-dimensional code by superimposing the dot matrix code on part or all of the original two-dimensional code filled with color, which further improves the overall coding density, strong encryption, and improves cracking and Difficulty of imitation. In addition, calculate the color code of predetermined number based on the first object information, then according to filling sequence, the color code of predetermined number is respectively filled in the area of predetermined number that original two-dimension code is divided, thereby A QR code whose color changes according to a certain logic is generated."

上述现有技术通过融合点阵码以及颜色代码,提高了二维码的编码密度和破译难度;但是本质上是在二维码上加上颜色,生成方式复杂麻烦,且改造后的二维码还是容易被篡改、伪造。The above-mentioned existing technology improves the coding density and deciphering difficulty of the two-dimensional code by fusing the dot matrix code and the color code; It is still easy to be tampered with and forged.

发明内容Contents of the invention

为了解决上述现有技术中存在的问题,本发明提出了一种堆叠三维码的生成方法、系统、设备和存储介质,根据指定的生成样式在目标码区上填充融合的二维码和点阵码,生成堆叠三维码,能够提高码的安全性和容量,克服了容易被篡改、伪造的弊端。In order to solve the problems existing in the above-mentioned prior art, the present invention proposes a generation method, system, device and storage medium of a stacked three-dimensional code, and fills the fused two-dimensional code and dot matrix on the target code area according to the specified generation pattern Code, generate a stacked three-dimensional code, which can improve the security and capacity of the code, and overcome the disadvantages of being easily tampered and forged.

本发明的技术方案如下:Technical scheme of the present invention is as follows:

一方面,本发明提出一种堆叠三维码的生成方法,包括以下步骤:On the one hand, the present invention proposes a method for generating a stacked three-dimensional code, comprising the following steps:

确定堆叠三维码的生成样式,所述生成样式为预先设定的二维码及点阵码在显示区域内的分布样式;Determine the generation pattern of the stacked three-dimensional code, the generation pattern is the distribution pattern of the preset two-dimensional code and dot matrix code in the display area;

获取印刷载体上设计的码区显示尺寸数据;Obtain the display size data of the code area designed on the printed carrier;

根据所述码区显示尺寸数据以及确定的生成样式,分别计算二维码和点阵码的尺寸数据和生成区域;According to the size data displayed in the code area and the determined generation style, respectively calculate the size data and generation area of the two-dimensional code and the dot matrix code;

获取二维码的生码数据和点阵码的生码数据;Obtain the raw code data of the QR code and the raw code data of the dot matrix code;

根据二维码的生码数据和尺寸数据生成对应尺寸的二维码,根据点阵码的生码数据和尺寸数据生成对应尺寸的点阵码;Generate a two-dimensional code of a corresponding size according to the raw code data and size data of the two-dimensional code, and generate a dot matrix code of a corresponding size according to the raw code data and size data of the dot matrix code;

根据二维码和点阵码的生成区域将生成的二维码和点阵码填充至对应的生成区域并进行融合,完成融合后输出为堆叠三维码图。According to the generation area of the two-dimensional code and the dot matrix code, fill the generated two-dimensional code and dot matrix code into the corresponding generation area and perform fusion. After the fusion is completed, the output is a stacked three-dimensional code map.

作为优选实施方式,所述生成样式具体包括:As a preferred implementation manner, the generating style specifically includes:

左右样式,左右样式中二维码及点阵码呈左右分布在显示区域内;Left and right style, in the left and right style, the two-dimensional code and dot matrix code are distributed in the display area on the left and right;

上下样式,上下样式中二维码及点阵码呈上下分布在显示区域内;Up and down style, in the up and down style, the QR code and dot matrix code are distributed up and down in the display area;

内嵌样式,内嵌样式中二维码布置在显示区域的中央,且点阵码布置在二维码的中央;Embedded style, in the embedded style, the QR code is arranged in the center of the display area, and the dot matrix code is arranged in the center of the QR code;

重叠样式,重叠样式中,二维码和点阵码均布置在显示区域的中央重叠在一起;Overlapping style, in the overlapping style, the two-dimensional code and the dot matrix code are arranged in the center of the display area and overlapped together;

四周样式,四周样式中二维码布置在显示区域的中央,且点阵码布置在二维码的四周。Surrounding style. In the surrounding style, the two-dimensional code is arranged in the center of the display area, and the dot matrix code is arranged around the two-dimensional code.

作为优选实施方式,所述印刷载体上设计的码区的形状为矩形,所述根据所述码区显示尺寸数据以及确定的生成样式,分别计算二维码和点阵码的尺寸数据和生成区域的方法具体为:As a preferred embodiment, the shape of the code area designed on the printed carrier is a rectangle, and the size data and the generation area of the two-dimensional code and the dot matrix code are respectively calculated according to the size data displayed in the code area and the determined generation style. The specific method is:

当生成样式为左右样式时,从码区显示尺寸数据中获取短边的边长作为二维码的边长尺寸,根据二维码的边长尺寸生成一正方形的区域布置在码区的左方或右方作为二维码的生成区域,码区的剩余区域作为点阵码的生成区域;When the generated style is the left and right style, the length of the short side is obtained from the display size data of the code area as the side length size of the two-dimensional code, and a square area is generated according to the side length size of the two-dimensional code and arranged on the left side of the code area Or the right side is used as the generation area of the two-dimensional code, and the remaining area of the code area is used as the generation area of the dot matrix code;

当生成样式为上下样式时,从码区显示尺寸数据中获取短边的边长作为二维码的边长尺寸,根据二维码的边长尺寸生成一正方形的区域布置在码区的上方或下方作为二维码的生成区域,码区的剩余区域作为点阵码的生成区域;When the generated style is the up-and-down style, the length of the short side is obtained from the display size data of the code area as the side length size of the two-dimensional code, and a square area is generated according to the side length size of the two-dimensional code and arranged on the top of the code area or The bottom is used as the generation area of the two-dimensional code, and the remaining area of the code area is used as the generation area of the dot matrix code;

当生成样式为内嵌样式时,根据码区显示尺寸数据在码区的中心点以码区的短边的边长为二维码的边长,生成一正方形区域作为二维码的生成区域;根据选定的二维码的容错级别计算点阵码的边长,根据点阵码的边长在码区的中心点生成一正方形区域作为点阵码的生成区域;When the generated style is an embedded style, according to the code area display size data at the center point of the code area, the side length of the short side of the code area is the side length of the two-dimensional code, and a square area is generated as the two-dimensional code generation area; Calculate the side length of the dot matrix code according to the error tolerance level of the selected two-dimensional code, and generate a square area as the generation area of the dot matrix code at the center point of the code area according to the side length of the dot matrix code;

当生成样式为重叠样式时,根据码区显示尺寸数据在码区的中心点以码区的短边的边长生成一正方形区域同时作为二维码和点阵码的生成区域;When the generated style is an overlapping style, a square area is generated at the center point of the code area with the length of the short side of the code area according to the display size data of the code area, and is simultaneously used as the generation area of the two-dimensional code and the dot matrix code;

当生成样式为四周样式时,将码区的显示尺寸数据作为点阵码的尺寸数据,整个码区作为点阵码的生成区域;在码区的中心点以码区的短边的边长为二维码的边长,生成一正方形区域作为二维码的生成区域。When the generated style is the surrounding style, the display size data of the code area is used as the size data of the dot matrix code, and the entire code area is used as the generation area of the dot matrix code; at the center point of the code area, the length of the short side of the code area is The side length of the two-dimensional code generates a square area as the generation area of the two-dimensional code.

作为优选实施方式,所述根据二维码的生码数据和尺寸数据生成对应尺寸的二维码的方法具体为:As a preferred implementation, the method for generating a two-dimensional code of a corresponding size according to the raw code data and size data of the two-dimensional code is specifically:

根据二维码的生码算法将二维码的生码数据转换为01矩阵;Convert the raw code data of the two-dimensional code into a 01 matrix according to the code-generating algorithm of the two-dimensional code;

获取二维码的版本,得到所生成二维码的横向模块数;Obtain the version of the QR code, and obtain the number of horizontal modules of the generated QR code;

根据模块数和二维码的尺寸数据计算每个模块的大小:Calculate the size of each module based on the number of modules and the size data of the QR code:

W=L/NW=L/N

其中,W为每个模块的边长,L为从二维码的尺寸数据获取的二维码边长,N为二维码的横向模块数;Wherein, W is the side length of each module, L is the side length of the two-dimensional code obtained from the size data of the two-dimensional code, and N is the number of horizontal modules of the two-dimensional code;

将01矩阵进行映射放大,使黑白模块的边长均为W,生成所述对应尺寸的二维码。The 01 matrix is mapped and enlarged so that the length of the sides of the black and white modules is both W, and a two-dimensional code of the corresponding size is generated.

作为优选实施方式,所述根据点阵码的生码数据和尺寸数据生成对应尺寸的点阵码的方法具体为:As a preferred embodiment, the method for generating a dot matrix code of a corresponding size according to raw code data and size data of a dot matrix code is specifically:

根据点阵码的生码算法将点阵码的生码数据转换为点阵码;According to the raw code algorithm of the dot matrix code, the raw code data of the dot matrix code is converted into a dot matrix code;

将点阵码输出为固定dpi的码图,dpi大于600,且码图面积大于通过点阵码尺寸数据计算出的点阵码生成区域的面积;Output the dot matrix code as a fixed dpi code map, where the dpi is greater than 600, and the area of the code map is greater than the area of the dot matrix code generation area calculated by the dot matrix code size data;

保持码图的dpi不变,从码图中裁剪出与点阵码的尺寸数据相适应的小码图,拼接小裁剪出的小码图生成所述对应尺寸的点阵码。Keeping the dpi of the code map unchanged, cutting out a small code map suitable for the size data of the dot matrix code from the code map, and splicing the small code maps cut out to generate the dot matrix code of the corresponding size.

作为优选实施方式,所述根据二维码和点阵码的生成区域将生成的二维码和点阵码填充至对应的生成区域并进行融合的方法具体为:As a preferred embodiment, the method of filling the generated two-dimensional code and dot matrix code into the corresponding generation area according to the generation area of the two-dimensional code and the dot matrix code and performing fusion is specifically:

若生成样式为左右样式或上下样式,则按二维码和点阵码的生成区域填充并显示生成的二维码及点阵码,融合方法为:If the generated style is left-right or top-bottom, fill and display the generated QR code and dot matrix code according to the generated area of the QR code and dot matrix code. The fusion method is:

Figure BDA0003841573060000051
Figure BDA0003841573060000051

若生成样式为内嵌样式,则先按照二维码的生成区域填充并显示生成的二维码,继续在生成的二维码内部的点阵码的生成区域填充并显示生成的点阵码,融合方法为:If the generated style is an embedded style, first fill and display the generated QR code according to the generated area of the QR code, and continue to fill and display the generated dot matrix code in the generated area of the dot matrix code inside the generated QR code, The fusion method is:

Figure BDA0003841573060000052
Figure BDA0003841573060000052

若生成样式为重叠样式,则先按照二维码的生成区域填充并显示生成的二维码,继续按照点阵码的生成区域填充并显示生成的点阵码,同时在生成的二维码的白色模块内显示点阵码,融合方法为:If the generated style is an overlapping style, first fill and display the generated QR code according to the generated area of the QR code, continue to fill and display the generated dot matrix code according to the generated area of the dot matrix code, and at the same time The dot matrix code is displayed in the white module, and the fusion method is:

Figure BDA0003841573060000061
Figure BDA0003841573060000061

若生成样式为四周样式,则先按照点阵码的生成区域填充并显示生成的点阵码,继续在生成的点阵码内部的二维码的生成区域填充并显示生成的二维码,融合方法为:If the generated style is the surrounding style, first fill and display the generated dot matrix code according to the generated area of the dot matrix code, continue to fill and display the generated QR code in the generated area of the QR code inside the generated dot matrix code, and integrate The method is:

Figure BDA0003841573060000062
Figure BDA0003841573060000062

其中,g(x,y)为融合后图像在横坐标为x,纵坐标为y的点的像素值;h(x,y)为生成的二维码在横坐标为x,纵坐标为y的点的像素值;f(x,y)为生成的点阵码在横坐标为x,纵坐标为y的点的像素值;D(h)为二维码的生成区域,D(f)为点阵码的生成区域。Among them, g(x, y) is the pixel value of the fused image at the point where the abscissa is x and the ordinate is y; h(x, y) is the generated two-dimensional code where the abscissa is x and the ordinate is y The pixel value of the point; f(x, y) is the pixel value of the generated dot matrix code at the point where the abscissa is x and the ordinate is y; D(h) is the generation area of the two-dimensional code, D(f) It is the generation area of dot matrix code.

另一方面,本发明还提出一种堆叠三维码的生成系统,包括:On the other hand, the present invention also proposes a system for generating a stacked three-dimensional code, including:

生成样式确定模块,用于确定堆叠三维码的生成样式,所述生成样式为预先设定的二维码及点阵码在显示区域内的分布样式;A generation pattern determination module is used to determine the generation pattern of the stacked three-dimensional code, and the generation pattern is the distribution pattern of the preset two-dimensional code and the dot matrix code in the display area;

显示尺寸获取模块,用于获取印刷载体上设计的码区显示尺寸数据;The display size acquisition module is used to obtain the display size data of the code area designed on the printing carrier;

生成尺寸获取模块,用于根据所述码区显示尺寸数据以及确定的生成样式,分别计算二维码和点阵码的尺寸数据和生成区域;Generate a size acquisition module, used to calculate the size data and generation area of the two-dimensional code and the dot matrix code according to the size data displayed in the code area and the determined generation style;

生码数据获取模块,用于获取二维码的生码数据和点阵码的生码数据;The raw code data acquisition module is used to obtain the raw code data of the two-dimensional code and the raw code data of the dot matrix code;

生码模块,用于根据二维码的生码数据和尺寸数据生成对应尺寸的二维码,根据点阵码的生码数据和尺寸数据生成对应尺寸的点阵码;The raw code module is used to generate a two-dimensional code of a corresponding size according to the raw code data and size data of the two-dimensional code, and to generate a dot matrix code of a corresponding size according to the raw code data and the size data of the dot matrix code;

融合模块,用于根据二维码和点阵码的生成区域将生成的二维码和点阵码填充至对应的生成区域并进行融合,完成融合后输出为堆叠三维码图。The fusion module is used to fill the generated two-dimensional code and dot matrix code into the corresponding generation area according to the generation area of the two-dimensional code and the dot matrix code and perform fusion, and output a stacked three-dimensional code map after the fusion is completed.

再一方面,本发明还提出一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如本发明任一实施例所述的一种堆叠三维码的生成方法。In yet another aspect, the present invention also proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the program, any implementation of the present invention can be realized. A method for generating stacked three-dimensional codes as described in the example.

再一方面,本发明还提出一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明任一实施例所述的一种堆叠三维码的生成方法。In another aspect, the present invention also proposes a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, a method for generating a stacked three-dimensional code as described in any embodiment of the present invention is implemented.

本发明具有如下有益效果:The present invention has following beneficial effect:

1、本发明一种堆叠三维码的生成方法,根据指定的生成样式在目标码区上填充融合的二维码和点阵码,生成堆叠三维码,能够提高码的安全性和容量,并克服了普通二维码容易被篡改、伪造等方面的弊端,增强了防伪功能。1. A method for generating a stacked three-dimensional code according to the present invention fills the fused two-dimensional code and dot matrix code on the target code area according to the specified generation pattern to generate a stacked three-dimensional code, which can improve the security and capacity of the code, and overcome the It eliminates the disadvantages of ordinary two-dimensional codes that are easy to be tampered with and forged, and enhances the anti-counterfeiting function.

2、本发明一种堆叠三维码的生成方法,具有多种生成样式可供选择,能够匹配不同目标码区的设计需求,生成方式灵活方便。2. A method for generating stacked three-dimensional codes of the present invention has multiple generation styles to choose from, can match the design requirements of different target code areas, and the generation method is flexible and convenient.

附图说明Description of drawings

图1为本发明实施例一的方法流程示意图;Fig. 1 is a schematic flow chart of the method of Embodiment 1 of the present invention;

图2为本发明实施例中左右样式的堆叠三维码示例图;Fig. 2 is an example diagram of stacked three-dimensional codes in the left and right styles in the embodiment of the present invention;

图3为本发明实施例中内嵌样式的堆叠三维码示例图;Fig. 3 is an example diagram of a stacked three-dimensional code in an embedded style in an embodiment of the present invention;

图4为本发明实施例中重叠样式的堆叠三维码示例图;Fig. 4 is an example diagram of a stacked three-dimensional code in an overlapping style in an embodiment of the present invention;

图5为本发明实施例中四周样式的堆叠三维码示例图;Fig. 5 is an example diagram of a stacked three-dimensional code in a surrounding style in an embodiment of the present invention;

图6为本发明实施例中重叠样式的堆叠三维码中二维码和点阵码的生成区域尺寸数据获取示例图。Fig. 6 is an example diagram of acquiring the size data of the generation area of the two-dimensional code and the dot matrix code in the stacked three-dimensional code of the overlapping style in the 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 creative efforts fall within the protection scope of the present invention.

应当理解,文中所使用的步骤编号仅是为了方便描述,不对作为对步骤执行先后顺序的限定。It should be understood that the step numbers used herein are only for convenience of description, and are not intended to limit the execution order of the steps.

应当理解,在本发明说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本发明。如在本发明说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should be understood that the terminology used in the description of the present invention is for the purpose of describing particular embodiments only and is not intended to limit the present invention. As used in this specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural referents unless the context clearly dictates otherwise.

术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。The terms "comprising" and "comprising" indicate the presence of described features, integers, steps, operations, elements and/or components, but do not exclude the presence of one or more other features, integers, steps, operations, elements, components and/or The presence or addition of its collection.

术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。The term "and/or" refers to any combination of one or more of the associated listed items and all possible combinations and includes such combinations.

实施例一:Embodiment one:

参见图1,一种堆叠三维码的生成方法,包括以下步骤:Referring to Fig. 1, a method for generating a stacked three-dimensional code comprises the following steps:

S100、确定堆叠三维码的生成样式,所述生成样式为预先设定的二维码及点阵码在显示区域内的分布样式,用户通过生码设备自行选择确定想要的生成样式,同时可以预览生成样式的生成效果;S100. Determine the generation pattern of the stacked three-dimensional code, the generation pattern is the distribution pattern of the pre-set two-dimensional code and the dot matrix code in the display area, the user selects and determines the desired generation pattern through the code generation device, and at the same time can Preview the generation effect of the generated style;

S200、获取印刷载体上设计的码区显示尺寸数据,印刷载体可以是包装袋、包装纸、包装盒等等,这些印刷载体上在设计时均预留了一个码区用于显示条码,在当前步骤获取这个设计的码区显示尺寸数据;S200. Acquire the display size data of the code area designed on the printing carrier. The printing carrier can be a packaging bag, wrapping paper, packaging box, etc., and a code area is reserved for displaying the barcode on these printing carriers during design. The step is to obtain the code area display size data of this design;

S300、根据从步骤S200中获取的码区显示尺寸数据以及在步骤S100中选定的生成样式,分别计算所要生成的二维码和点阵码的尺寸数据和生成区域;S300. According to the code area display size data obtained in step S200 and the generation style selected in step S100, respectively calculate the size data and generation area of the two-dimensional code and the dot matrix code to be generated;

S400、获取二维码的生码数据和点阵码的生码数据;二维码和点阵码的生码数据可以有关联,也可以无关联;在有关联的情景下扫描二维码和点阵码可以进行联合使用,例如二维码的生码数据对应一个网址入口,点阵码的生码数据对应一个验证数据,通过验证数据可登陆网址入口,这样同时扫描二维码和点阵码才能进入网址,提高了码的安全性;又或者是,二维码的生码数据为企业或个人信息,点阵码的生码数据指向企业或个人信息的防伪信息,这样扫描点阵码可以确定二维码中包含数据是真实的,克服了普通二维码容易被篡改、伪造等方面的弊端,增强了防伪功能;在无关联的情景下,二维码和点阵码的数据可以承载更大容量的信息,不破坏原来信息的情况下增加了新的信息纬度,提高了码的容量;S400. Obtain the raw code data of the two-dimensional code and the raw code data of the dot-matrix code; the two-dimensional code and the raw code data of the dot-matrix code may or may not be related; scan the two-dimensional code and the Dot matrix codes can be used in combination. For example, the raw code data of the QR code corresponds to a website entry, and the raw code data of the dot matrix code corresponds to a verification data. The verification data can be used to log in to the website entrance, so that the QR code and dot matrix can be scanned at the same time code to enter the website, which improves the security of the code; or, the raw code data of the two-dimensional code is enterprise or personal information, and the raw code data of the dot matrix code points to the anti-counterfeiting information of the enterprise or personal information, so scanning the dot matrix code It can be sure that the data contained in the two-dimensional code is real, overcomes the disadvantages of ordinary two-dimensional codes that are easy to be tampered with and forged, and enhances the anti-counterfeiting function; in unrelated scenarios, the data of two-dimensional codes and dot matrix codes can be Carrying a larger capacity of information, adding new information latitude without destroying the original information, and improving the capacity of the code;

S500、根据二维码的生码数据和尺寸数据生成对应尺寸的二维码,根据点阵码的生码数据和尺寸数据生成对应尺寸的点阵码;S500. Generate a two-dimensional code of a corresponding size according to the raw code data and size data of the two-dimensional code, and generate a dot matrix code of a corresponding size according to the raw code data and size data of the dot matrix code;

S600、根据二维码和点阵码的生成区域将生成的二维码和点阵码填充至对应的生成区域并进行融合,因二维码和点阵码进行堆叠后,在指定的区域要显示指定的内容,如果生成的二维码和点阵码因为样式原因有重叠部分,则需要确定哪个码显示在上层,因此需要对二维码和点阵码进行融合处理,将融合后的图形组合生成完整的三维码图,保存输出。S600. Fill the generated two-dimensional code and dot matrix code into the corresponding generation area according to the generation area of the two-dimensional code and the dot matrix code and perform fusion. After the two-dimensional code and the dot matrix code are stacked, the specified area needs to Display the specified content. If the generated QR code and dot matrix code have overlapping parts due to style reasons, it is necessary to determine which code is displayed on the upper layer. Therefore, it is necessary to perform fusion processing on the QR code and dot matrix code, and the fused graphics Combine to generate a complete 3D code map and save the output.

作为本实施例的优选实施方式,所述生成样式具体包括:As a preferred implementation of this embodiment, the generated style specifically includes:

左右样式,如图2所示,左右样式中二维码及点阵码呈左右分布在显示区域内;Left and right style, as shown in Figure 2, in the left and right style, the two-dimensional code and dot matrix code are distributed in the display area on the left and right;

上下样式,上下样式中二维码及点阵码呈上下分布在显示区域内,上下样式与左右样式类似,因此本实施例中不再给出示例图;Up and down style, in the up and down style, the two-dimensional code and the dot matrix code are distributed up and down in the display area, and the up and down style is similar to the left and right style, so no example diagram is given in this embodiment;

内嵌样式,如图3所示,内嵌样式中二维码布置在显示区域的中央,且点阵码布置在二维码的中央;Embedded style, as shown in Figure 3, in the embedded style, the two-dimensional code is arranged in the center of the display area, and the dot matrix code is arranged in the center of the two-dimensional code;

重叠样式,如图4所示,重叠样式中,二维码和点阵码均布置在显示区域的中央重叠在一起;The overlapping style, as shown in Figure 4, in the overlapping style, the two-dimensional code and the dot matrix code are arranged in the center of the display area and overlapped together;

四周样式,如图5所示,四周样式中二维码布置在显示区域的中央,且点阵码布置在二维码的四周。The surrounding style, as shown in Figure 5, in the surrounding style, the two-dimensional code is arranged in the center of the display area, and the dot matrix code is arranged around the two-dimensional code.

作为本实施例的优选实施方式,在步骤S300中,所述印刷载体上设计的码区的形状为矩形,所述根据所述码区显示尺寸数据以及确定的生成样式,分别计算二维码和点阵码的尺寸数据和生成区域的方法具体为:As a preferred implementation of this embodiment, in step S300, the shape of the code area designed on the printed carrier is a rectangle, and according to the display size data of the code area and the determined generation style, calculate the two-dimensional code and The size data of the dot matrix code and the method of generating the area are as follows:

S301、当生成样式为左右样式或上下样式时,优先保证二维码的生成面积,从码区显示尺寸数据中获取短边的边长作为二维码的边长尺寸;如果是左右样式,根据二维码的边长尺寸生成一正方形的区域布置在码区的左方或右方作为二维码的生成区域,码区的剩余区域作为点阵码的生成区域;如果是上下样式,则根据二维码的边长尺寸生成一正方形的区域布置在码区的上方或下方作为二维码的生成区域,码区的剩余区域作为点阵码的生成区域;S301. When the generated style is a left-right style or a top-bottom style, give priority to ensuring the generated area of the two-dimensional code, and obtain the side length of the short side from the code area display size data as the side length size of the two-dimensional code; if it is a left-right style, according to The side length size of the two-dimensional code generates a square area arranged on the left or right of the code area as the generation area of the two-dimensional code, and the remaining area of the code area is used as the generation area of the dot matrix code; The side length of the two-dimensional code generates a square area arranged above or below the code area as the generation area of the two-dimensional code, and the remaining area of the code area is used as the generation area of the dot matrix code;

S302、当生成样式为内嵌样式时,根据码区显示尺寸数据在码区的中心点以码区的短边的边长为二维码的边长,生成一正方形区域作为二维码的生成区域;根据选定的二维码的容错级别计算点阵码的边长,根据点阵码的边长在码区的中心点生成一正方形区域作为点阵码的生成区域;二维码的容错级别分别为L、M、Q和H,二维码的边长假设为L,则内嵌样式下点阵码的边长最大为:S302. When the generated style is an embedded style, according to the code area display size data at the center point of the code area, the side length of the short side of the code area is the side length of the two-dimensional code, and a square area is generated as the generation of the two-dimensional code Area; Calculate the side length of the dot matrix code according to the fault tolerance level of the selected two-dimensional code, and generate a square area at the center point of the code area according to the side length of the dot matrix code as the generation area of the dot matrix code; the fault tolerance of the two-dimensional code The levels are L, M, Q, and H, and the side length of the two-dimensional code is assumed to be L, then the maximum side length of the dot matrix code in the embedded style is:

Figure BDA0003841573060000111
(ECC为对应的纠错比例,7%、15%、25%、30%)
Figure BDA0003841573060000111
(ECC is the corresponding error correction ratio, 7%, 15%, 25%, 30%)

当知道二维码版本和每个模块大小时,可采用以下公式估算点阵码的最大边长:When the QR code version and the size of each module are known, the following formula can be used to estimate the maximum side length of the dot matrix code:

Figure BDA0003841573060000112
(V为版本,H为每个模块的大小)
Figure BDA0003841573060000112
(V is the version, H is the size of each module)

S303、当生成样式为重叠样式时,根据码区显示尺寸数据在码区的中心点以码区的短边的边长生成一正方形区域同时作为二维码和点阵码的生成区域,即二维码和点阵码的生成区域是边长一致的正方形;如图6所示,图中码区的长边长度为W,短边长度为H,则选择H作为边长在码区的中心点生成正方形区域作为二维码和点阵码的生成区域;S303, when the generated style is an overlapping style, according to the code area display size data, a square area is generated at the center point of the code area with the length of the short side of the code area as the generation area of the two-dimensional code and the dot matrix code, i.e. two The generation area of the two-dimensional code and the dot matrix code is a square with the same side length; as shown in Figure 6, the length of the long side of the code area in the figure is W, and the length of the short side is H, then choose H as the side length in the center of the code area The point generates a square area as the generation area of the two-dimensional code and the dot matrix code;

S304、当生成样式为四周样式时,将码区的显示尺寸数据作为点阵码的尺寸数据,整个码区作为点阵码的生成区域;在码区的中心点以码区的短边的边长为二维码的边长,生成一正方形区域作为二维码的生成区域。S304, when generating style is around style, the display size data of code area is used as the size data of dot matrix code, and whole code area is as the generation area of dot matrix code; In the central point of code area, take the side of the short side of code area The length is the side length of the two-dimensional code, and a square area is generated as the generation area of the two-dimensional code.

作为本实施例的优选实施方式,在步骤S500中,所述根据二维码的生码数据和尺寸数据生成对应尺寸的二维码的方法具体为:As a preferred implementation of this embodiment, in step S500, the method for generating a two-dimensional code of a corresponding size according to the raw code data and size data of the two-dimensional code is specifically:

S511、根据二维码的生码算法将二维码的生码数据转换为01矩阵;S511. Convert the raw code data of the two-dimensional code into an 01 matrix according to the two-dimensional code raw code algorithm;

S512、获取二维码的版本,得到所生成二维码的横向模块数;S512. Obtain the version of the two-dimensional code, and obtain the number of horizontal modules of the generated two-dimensional code;

S513、根据模块数和二维码的尺寸数据计算每个模块的大小:S513. Calculate the size of each module according to the number of modules and the size data of the two-dimensional code:

W=L/NW=L/N

其中,W为每个模块的边长,L为从二维码的尺寸数据获取的二维码边长,N为二维码的横向模块数(根据二维码版本获得);Wherein, W is the side length of each module, L is the side length of the two-dimensional code obtained from the size data of the two-dimensional code, and N is the number of horizontal modules of the two-dimensional code (obtained according to the two-dimensional code version);

S514、将01矩阵进行映射放大,使黑白模块的边长均为W,生成所述对应尺寸的二维码。S514. Mapping and enlarging the 01 matrix so that the lengths of sides of the black and white modules are both W, and generating a two-dimensional code of the corresponding size.

作为本实施例的优选实施方式,在步骤S500中,由于生成的点阵码通过点间距和点大小来进行防伪判断,因此不能像二维码一样对模块进行缩放,只能在生成完成的大面积点阵码图中裁剪指定面积的点阵码来完成,因此根据点阵码的生码数据和尺寸数据生成对应尺寸的点阵码的方法具体为:As a preferred implementation of this embodiment, in step S500, since the generated dot matrix code is used for anti-counterfeiting judgment through dot spacing and dot size, the module cannot be scaled like a two-dimensional code, and only the generated dot matrix code can be scaled. The area dot matrix code is completed by cutting the dot matrix code of the specified area, so the method of generating the dot matrix code of the corresponding size according to the raw code data and size data of the dot matrix code is as follows:

S521、根据点阵码的生码算法将点阵码的生码数据转换为点阵码;S521. Convert the raw code data of the dot matrix code into a dot matrix code according to the code generation algorithm of the dot matrix code;

S522、将点阵码输出为固定dpi的码图,dpi大于600,且码图面积大于通过点阵码尺寸数据计算出的点阵码生成区域的面积;S522. Outputting the dot matrix code as a code map with a fixed dpi, where the dpi is greater than 600, and the area of the code map is larger than the area of the dot matrix code generation area calculated by the dot matrix code size data;

S523、保持码图的dpi不变,从码图中裁剪出与点阵码的尺寸数据相适应的小码图,拼接小裁剪出的小码图生成所述对应尺寸的点阵码。S523. Keeping the dpi of the code map unchanged, cut out a small code map suitable for the size data of the dot matrix code from the code map, and splicing the cut out small code maps to generate a dot matrix code of the corresponding size.

作为本实施例的优选实施方式,所述根据二维码和点阵码的生成区域将生成的二维码和点阵码填充至对应的生成区域并进行融合的方法具体为:As a preferred implementation of this embodiment, the method of filling the generated two-dimensional code and dot matrix code into the corresponding generation area according to the generation area of the two-dimensional code and the dot matrix code and performing fusion is specifically:

若生成样式为左右样式或上下样式,则按二维码和点阵码的生成区域填充并显示生成的二维码及点阵码,融合方法为:If the generated style is left-right or top-bottom, fill and display the generated QR code and dot matrix code according to the generated area of the QR code and dot matrix code. The fusion method is:

Figure BDA0003841573060000131
Figure BDA0003841573060000131

若生成样式为内嵌样式,则先按照二维码的生成区域填充并显示生成的二维码,继续在生成的二维码内部的点阵码的生成区域填充并显示生成的点阵码,融合方法为:If the generated style is an embedded style, first fill and display the generated QR code according to the generated area of the QR code, and continue to fill and display the generated dot matrix code in the generated area of the dot matrix code inside the generated QR code, The fusion method is:

Figure BDA0003841573060000132
Figure BDA0003841573060000132

若生成样式为重叠样式,则先按照二维码的生成区域填充并显示生成的二维码,继续按照点阵码的生成区域填充并显示生成的点阵码,同时在生成的二维码的白色模块内显示点阵码,融合方法为:If the generated style is an overlapping style, first fill and display the generated QR code according to the generated area of the QR code, continue to fill and display the generated dot matrix code according to the generated area of the dot matrix code, and at the same time, in the generated QR code The dot matrix code is displayed in the white module, and the fusion method is:

Figure BDA0003841573060000141
Figure BDA0003841573060000141

若生成样式为四周样式,则先按照点阵码的生成区域填充并显示生成的点阵码,继续在生成的点阵码内部的二维码的生成区域填充并显示生成的二维码,融合方法为:If the generated style is the surrounding style, first fill and display the generated dot matrix code according to the generated area of the dot matrix code, continue to fill and display the generated QR code in the generated area of the QR code inside the generated dot matrix code, and integrate The method is:

Figure BDA0003841573060000142
Figure BDA0003841573060000142

其中,g(x,y)为融合后图像在横坐标为x,纵坐标为y的点的像素值;h(x,y)为生成的二维码在横坐标为x,纵坐标为y的点的像素值;f(x,y)为生成的点阵码在横坐标为x,纵坐标为y的点的像素值;D(h)为二维码的生成区域,D(f)为点阵码的生成区域;上述各个融合方法的公式说明了融合后的图像中的像素值是从生成的二维码中获得还是从点阵码中获得。Among them, g(x, y) is the pixel value of the fused image at the point where the abscissa is x and the ordinate is y; h(x, y) is the generated two-dimensional code where the abscissa is x and the ordinate is y The pixel value of the point; f(x, y) is the pixel value of the generated dot matrix code at the point where the abscissa is x and the ordinate is y; D(h) is the generation area of the two-dimensional code, D(f) is the generation area of the dot matrix code; the formulas of the above fusion methods indicate whether the pixel values in the fused image are obtained from the generated two-dimensional code or from the dot matrix code.

为帮助本领域技术人员更快速的理解本实施例的技术方案,以下举例若干不同生成样式的堆叠三维码的生成过程:In order to help those skilled in the art understand the technical solution of this embodiment more quickly, the following examples illustrate the generation process of stacked three-dimensional codes in several different generation styles:

首先是左右样式的堆叠三维码:The first is the stacked 3D code in the left and right styles:

A100、选定堆叠三维码的生成样式为左右样式;A100. The generated style of the selected stacked 3D code is the left and right style;

A200、根据包装印刷上的设计获取码区显示区域的面积为S;A200. According to the design on the packaging and printing, the area of the display area of the code area is S;

A300、选取码区显示区域的短边H作为二维码的边长;A300, select the short side H of the code area display area as the side length of the two-dimensional code;

A400、获取二维码的生码数据T1和点阵码的生码数据T2,T1和T2可包含数字、英文字母;A400. Obtain the raw code data T1 of the two-dimensional code and the raw code data T2 of the dot matrix code. T1 and T2 may contain numbers and English letters;

A501、将生码数据T1生成边长大小为H的二维码:A501. Generate a two-dimensional code whose side length is H from the raw code data T1:

A511、根据二维码的生码算法将生码数据T1转化为01矩阵;A511. Convert the raw code data T1 into a 01 matrix according to the code generation algorithm of the two-dimensional code;

A512、获取二维码的版本,得到所生成二维码的横向模块数N;A512, obtain the version of the two-dimensional code, and obtain the horizontal module number N of the generated two-dimensional code;

A513、根据模块数和边长计算每个模块的大小A513. Calculate the size of each module based on the number of modules and side length

W=H/NW=H/N

A514、将01矩阵进行映射放大,使每个黑白模块的边长都放大为W,从而生成对应尺寸的二维码。A514. Map and enlarge the 01 matrix, so that the side length of each black and white module is enlarged to W, thereby generating a two-dimensional code of a corresponding size.

A502、将生码数据T2生成指定面积大小的点阵码,点阵码的面积为S-H*H;A502, generate a dot matrix code with a specified area size from the raw code data T2, and the area of the dot matrix code is S-H*H;

A521、根据点码的生码算法根据生码算法将生码数据T2转化为点阵码;A521, according to the raw code algorithm of the dot code, the raw code data T2 is converted into a dot matrix code according to the raw code algorithm;

A522、将点阵码输出为固定dpi(大于600dpi)的码图,码图面积大于S-H*H;A522, the dot matrix code is output as a code map of fixed dpi (greater than 600dpi), and the area of the code map is greater than S-H*H;

A523、从上述生成的码图中裁剪面积为S-H*H的小码图,使小码图的一条边长度为H。A523. Cut out a small code graph with an area of S-H*H from the code graph generated above, so that the length of one side of the small code graph is H.

A600、在左右样式下,若左边为点阵码,则从左上角顶点开始先填充点阵码,使点阵码区域面积满足S-H*H,然后再开始填充二维码;若左边为二维码,则从左上角顶点开始,填充边长为H的二维码,填充完成后开始填充点阵码,直到所有区域填充完成。A600. In the left and right style, if the left side is a dot matrix code, fill the dot matrix code from the top left corner first, so that the area of the dot matrix code area satisfies S-H*H, and then start filling the two-dimensional code; if the left side is two-dimensional code, start from the vertex in the upper left corner, fill the QR code with a side length of H, and start filling the dot matrix code after the filling is completed until all areas are filled.

融合后的图形组合生成完整的三维码图,保存输出,如图2所示。The fused graphics are combined to generate a complete three-dimensional code map, and the output is saved, as shown in Figure 2.

然后是内嵌样式的堆叠三维码:Then there is a stacked QR code with an inline style:

B100、选定堆叠三维码的生成样式为内嵌样式;B100. The generation style of the selected stacked three-dimensional code is an embedded style;

B200、根据包装印刷上的设计获取码区显示区域的面积为S;B200. According to the design on the packaging and printing, the area of the display area of the code area is S;

B300、在码区显示区域的正中间选取短边H作为二维码的边长,根据二维码的纠错等级计算点阵码的边长,若二维码纠错等级为M,则可污损面积约为H*H*15%,此即为点阵码的最大面积。B300, select the short side H as the side length of the two-dimensional code in the middle of the code area display area, calculate the side length of the dot matrix code according to the error correction level of the two-dimensional code, if the two-dimensional code error correction level is M, then you can The stained area is about H*H*15%, which is the maximum area of the dot matrix code.

B400、获取二维码的生码数据T1和点阵码的生码数据T2,T1和T2可包含数字、英文字母;B400, obtaining the raw code data T1 of the two-dimensional code and the raw code data T2 of the dot matrix code, T1 and T2 can contain numbers and English letters;

B501、将生码数据T1生成边长大小为H的二维码:B501, generating a two-dimensional code whose side length is H from the raw code data T1:

B511、根据二维码的生码算法将生码数据T1转化为01矩阵;B511, converting the raw code data T1 into a 01 matrix according to the code generation algorithm of the two-dimensional code;

B512、获取二维码的版本,得到所生成二维码的横向模块数N;B512, obtain the version of the two-dimensional code, and obtain the horizontal module number N of the generated two-dimensional code;

B513、根据模块数和边长计算每个模块的大小B513. Calculate the size of each module based on the number of modules and side length

W=H/NW=H/N

B514、将01矩阵进行映射放大,使每个黑白模块的边长都放大为W,从而生成对应尺寸的二维码。B514. Map and enlarge the 01 matrix, so that the side length of each black and white module is enlarged to W, thereby generating a two-dimensional code of a corresponding size.

B502、将生码数据T2生成指定面积大小的点阵码,点阵码的面积为H*H*15%;B502, generate a dot matrix code with a specified area size from the raw code data T2, and the area of the dot matrix code is H*H*15%;

B521、根据点码的生码算法将生码数据T2转化为点阵码;B521, converting the raw code data T2 into a dot matrix code according to the raw code algorithm of the point code;

B522、将点阵码输出为固定dpi(大于600dpi)的码图,码图面积大于H*H*15%;B522, the dot matrix code is output as a code map of fixed dpi (greater than 600dpi), and the area of the code map is greater than H*H*15%;

B523、从上述生成的码图中选取面积为H*H*15%的小码图。B523. Select a small code map with an area of H*H*15% from the code map generated above.

B600、在内嵌样式下,先将生成的二维码填充指定区域S,在二维码的正中间区域覆盖点阵码,点阵码面积不大于H*H*15%。B600. In the embedded style, firstly fill the designated area S with the generated two-dimensional code, and cover the dot matrix code in the middle area of the two-dimensional code. The area of the dot matrix code is not greater than H*H*15%.

融合后的图形组合生成完整的三维码图,保存输出,如图3所示。The fused graphics are combined to generate a complete three-dimensional code map, and the output is saved, as shown in Figure 3.

然后是重叠样式的堆叠三维码:Then there are stacked 3D codes with overlapping styles:

C100、选定堆叠三维码的生成样式为重叠样式;C100, the generation style of the selected stacked three-dimensional code is an overlapping style;

C200、根据包装印刷上的设计获取码区显示区域的面积为S;C200. According to the design on the packaging and printing, the area of the display area of the code area is S;

C300、在码区显示区域的正中间选取短边H作为二维码的边长,点阵码的边长与二维码的边长相等也为H。C300. Select the short side H in the middle of the display area of the code area as the side length of the two-dimensional code, and the side length of the dot matrix code is equal to the side length of the two-dimensional code, which is also H.

C400、获取二维码的生码数据T1和点阵码的生码数据T2,T1和T2可包含数字、英文字母;C400, obtaining the raw code data T1 of the two-dimensional code and the raw code data T2 of the dot matrix code, T1 and T2 can contain numbers and English letters;

C501、将生码数据T1生成边长大小为H的二维码:C501, generating a two-dimensional code whose side length is H from the raw code data T1:

C511、根据二维码的生码算法生码算法将生码数据T1转化为01矩阵;C511, converting the code generation data T1 into a 01 matrix according to the code generation algorithm of the two-dimensional code;

C512、获取二维码的版本,得到所生成二维码的横向模块数N;C512, obtain the version of the two-dimensional code, and obtain the horizontal module number N of the generated two-dimensional code;

C513、根据模块数和边长计算每个模块的大小C513. Calculate the size of each module based on the number of modules and side length

W=H/NW=H/N

C514、将01矩阵进行映射放大,使每个黑白模块的边长都放大为W,从而生成对应尺寸的二维码。C514. Map and enlarge the 01 matrix, so that the side length of each black and white module is enlarged to W, thereby generating a two-dimensional code of a corresponding size.

C502、将生码数据T2生成指定面积大小的点阵码,点阵码的面积为H*H;C502, generating a dot matrix code with a designated area size from the raw code data T2, the area of the dot matrix code is H*H;

C521、根据点阵码生码算法将生码数据T2转化为点阵码;C521, converting the raw code data T2 into a dot matrix code according to the dot matrix code generation algorithm;

C522、将点阵码输出为固定dpi(大于600dpi)的码图,码图面积大于H*H;C522, the dot matrix code is output as a code map of fixed dpi (greater than 600dpi), and the area of the code map is greater than H*H;

C523、从上述生成的码图中选取面积为H*H的小码图。C523. Select a small code map with an area of H*H from the code map generated above.

C600、先将生成的二维码填充指定区域S,在二维码的上方区域融合点阵码,即在二维码的白色模块区域放置点阵码,而黑色模块保持不变。C600. First fill the designated area S with the generated two-dimensional code, and integrate the dot matrix code in the upper area of the two-dimensional code, that is, place the dot matrix code in the white module area of the two-dimensional code, while the black module remains unchanged.

Figure BDA0003841573060000181
Figure BDA0003841573060000181

融合后的图形组合生成完整的三维码图,保存输出,如图4所示。The fused graphics are combined to generate a complete three-dimensional code map, and the output is saved, as shown in Figure 4.

然后是四周样式的堆叠三维码:Then there are stacked 3D codes in the surrounding style:

D100、选定堆叠三维码的生成样式为四周样式;D100, the generation style of the selected stacked three-dimensional code is the surrounding style;

D200、根据包装印刷上的设计获取码区显示区域的面积为S;D200. According to the design on the packaging and printing, the area of the display area of the code area is S;

D300、将码区显示区域的长宽作为点阵码的长和宽,在显示面积的正中间选取最短边H作为二维码的边长。D300. Use the length and width of the display area of the code area as the length and width of the dot matrix code, and select the shortest side H in the middle of the display area as the side length of the two-dimensional code.

D400、获取二维码的生码数据T1和点阵码的生码数据T2,T1和T2可包含数字、英文字母;D400. Obtain the raw code data T1 of the two-dimensional code and the raw code data T2 of the dot matrix code, where T1 and T2 may contain numbers and English letters;

D501、将生码数据T1生成边长大小为H的二维码:D501. Generating the raw code data T1 into a two-dimensional code whose side length is H:

D511、根据二维码的生码算法将生码数据T1转化为01矩阵;D511, according to the code generation algorithm of the two-dimensional code, convert the code data T1 into a 01 matrix;

D512、获取二维码的版本,得到所生成二维码的横向模块数N;D512. Obtain the version of the two-dimensional code, and obtain the number N of horizontal modules of the generated two-dimensional code;

D513、根据模块数和边长计算每个模块的大小D513. Calculate the size of each module according to the number of modules and side length

W=H/NW=H/N

D514、将01矩阵进行映射放大,使每个黑白模块的边长都放大为W,从而生成对应尺寸的二维码。D514. Map and enlarge the 01 matrix, so that the side length of each black and white module is enlarged to W, thereby generating a two-dimensional code of a corresponding size.

D502、将生码数据T2生成指定面积大小的点阵码,点阵码的面积为S;D502, generate a dot matrix code with a specified area size from the raw code data T2, and the area of the dot matrix code is S;

D521、根据点阵码的生码算法将生码数据T2转化为点阵码;D521, converting the raw code data T2 into a dot matrix code according to the code generation algorithm of the dot matrix code;

D522、将点阵码输出为固定dpi(大于600dpi)的码图,码图面积大于S;D522, the dot matrix code is output as a code map of fixed dpi (greater than 600dpi), and the area of the code map is greater than S;

D523、从上述生成的码图中选取面积为S的小码图。D523. Select a small code map with an area S from the code map generated above.

D600、先将生成的点阵码填充指定区域S,在点阵码的正中间区域选取边长为H的区域作为二维码区域,该区域的像素值为二维码的值,融合方式为:D600. First fill the designated area S with the generated dot matrix code, select the area with side length H as the two-dimensional code area in the middle area of the dot matrix code, the pixel value of this area is the value of the two-dimensional code, and the fusion method is :

Figure BDA0003841573060000191
Figure BDA0003841573060000191

融合后的图形组合生成完整的三维码图,保存输出,如图5所示。The fused graphics are combined to generate a complete three-dimensional code map, and the output is saved, as shown in Figure 5.

实施例二:Embodiment two:

本实施例提供一种堆叠三维码的生成系统,包括:This embodiment provides a system for generating a stacked three-dimensional code, including:

生成样式确定模块,用于确定堆叠三维码的生成样式,所述生成样式为预先设定的二维码及点阵码在显示区域内的分布样式;该模块用于实现实施例一中步骤S100的功能,在此不再赘述;A generation pattern determination module is used to determine the generation pattern of the stacked three-dimensional code, and the generation pattern is the distribution pattern of the preset two-dimensional code and the dot matrix code in the display area; this module is used to realize step S100 in the first embodiment function, which will not be repeated here;

显示尺寸获取模块,用于获取印刷载体上设计的码区显示尺寸数据;该模块用于实现实施例一中步骤S200的功能,在此不再赘述;The display size acquisition module is used to obtain the code area display size data designed on the printing carrier; this module is used to realize the function of step S200 in the first embodiment, and will not be repeated here;

生成尺寸获取模块,用于根据所述码区显示尺寸数据以及确定的生成样式,分别计算二维码和点阵码的尺寸数据和生成区域;该模块用于实现实施例一中步骤S300的功能,在此不再赘述;Generate a size acquisition module, which is used to calculate the size data and the generation area of the two-dimensional code and the dot matrix code respectively according to the size data displayed in the code area and the determined generation style; this module is used to realize the function of step S300 in the first embodiment , will not repeat them here;

生码数据获取模块,用于获取二维码的生码数据和点阵码的生码数据;该模块用于实现实施例一中步骤S400的功能,在此不再赘述;The raw code data acquisition module is used to obtain the raw code data of the two-dimensional code and the raw code data of the dot matrix code; this module is used to realize the function of step S400 in the first embodiment, and will not be repeated here;

生码模块,用于根据二维码的生码数据和尺寸数据生成对应尺寸的二维码,根据点阵码的生码数据和尺寸数据生成对应尺寸的点阵码;该模块用于实现实施例一中步骤S500的功能,在此不再赘述;The raw code module is used to generate a two-dimensional code of the corresponding size according to the raw code data and size data of the two-dimensional code, and to generate a dot matrix code of the corresponding size according to the raw code data and size data of the dot matrix code; this module is used to implement The function of step S500 in Example 1 will not be repeated here;

融合模块,用于根据二维码和点阵码的生成区域将生成的二维码和点阵码填充至对应的生成区域并进行融合,完成融合后输出为堆叠三维码图;该模块用于实现实施例一中步骤S600的功能,在此不再赘述。The fusion module is used to fill the generated two-dimensional code and dot matrix code into the corresponding generation area according to the generation area of the two-dimensional code and the dot matrix code and perform fusion. After the fusion is completed, the output is a stacked three-dimensional code map; this module is used for The function of step S600 in the first embodiment is realized, which will not be repeated here.

实施例三:Embodiment three:

本实施例提出一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述程序时实现如本发明任一实施例所述的一种堆叠三维码的生成方法。This embodiment proposes an electronic device, including a memory, a processor, and a computer program stored on the memory and operable on the processor. When the processor executes the program, the computer program described in any embodiment of the present invention is implemented. A method for generating stacked three-dimensional codes.

实施例三:Embodiment three:

本实施例提出一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本发明任一实施例所述的一种堆叠三维码的生成方法。This embodiment proposes a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, a method for generating a stacked three-dimensional code as described in any embodiment of the present invention is implemented.

本申请实施例中,“至少一个”是指一个或者多个,“多个”是指两个或两个以上。“和/或”,描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示单独存在A、同时存在A和B、单独存在B的情况。其中A,B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。“以下至少一项”及其类似表达,是指的这些项中的任意组合,包括单项或复数项的任意组合。例如,a,b和c中的至少一项可以表示:a,b,c,a和b,a和c,b和c或a和b和c,其中a,b,c可以是单个,也可以是多个。In the embodiments of the present application, "at least one" means one or more, and "multiple" means two or more. "And/or" describes the association relationship of associated objects, indicating that there may be three kinds of relationships, for example, A and/or B may indicate that A exists alone, A and B exist simultaneously, or B exists alone. Among them, A and B can be singular or plural. The character "/" generally indicates that the contextual objects are an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c or a and b and c, where a, b, c can be single, or Can be multiple.

本领域普通技术人员可以意识到,本文中公开的实施例中描述的各单元及算法步骤,能够以电子硬件、计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can appreciate that each unit and algorithm steps described in the embodiments disclosed herein can be realized by a combination of electronic hardware, computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the scope of the present application.

所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the above-described system, device and unit can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.

在本申请所提供的几个实施例中,任一功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory;以下简称:ROM)、随机存取存储器(Random Access Memory;以下简称:RAM)、磁碟或者光盘等各种可以存储程序代码的介质。In several embodiments provided in this application, if any function is realized in the form of a software function unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory; hereinafter referred to as ROM), random access memory (Random Access Memory; hereinafter referred to as RAM), magnetic disk or optical disc, etc. A medium on which program code can be stored.

以上所述仅为本发明的实施例,并非因此限制本发明的专利范围,凡是利用本发明说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本发明的专利保护范围内。The above is only an embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the description of the present invention and the contents of the accompanying drawings, or directly or indirectly used in other related technologies fields, all of which are equally included in the scope of patent protection of the present invention.

Claims (9)

Translated fromChinese
1.一种堆叠三维码的生成方法,其特征在于,包括以下步骤:1. A method for generating stacked three-dimensional codes, comprising the following steps:确定堆叠三维码的生成样式,所述生成样式为预先设定的二维码及点阵码在显示区域内的分布样式;Determine the generation pattern of the stacked three-dimensional code, the generation pattern is the distribution pattern of the preset two-dimensional code and dot matrix code in the display area;获取印刷载体上设计的码区显示尺寸数据;Obtain the display size data of the code area designed on the printed carrier;根据所述码区显示尺寸数据以及确定的生成样式,分别计算二维码和点阵码的尺寸数据和生成区域;According to the size data displayed in the code area and the determined generation style, respectively calculate the size data and generation area of the two-dimensional code and the dot matrix code;获取二维码的生码数据和点阵码的生码数据;Obtain the raw code data of the QR code and the raw code data of the dot matrix code;根据二维码的生码数据和尺寸数据生成对应尺寸的二维码,根据点阵码的生码数据和尺寸数据生成对应尺寸的点阵码;Generate a two-dimensional code of a corresponding size according to the raw code data and size data of the two-dimensional code, and generate a dot matrix code of a corresponding size according to the raw code data and size data of the dot matrix code;根据二维码和点阵码的生成区域将生成的二维码和点阵码填充至对应的生成区域并进行融合,完成融合后输出为堆叠三维码图。According to the generation area of the two-dimensional code and the dot matrix code, fill the generated two-dimensional code and dot matrix code into the corresponding generation area and perform fusion. After the fusion is completed, the output is a stacked three-dimensional code map.2.根据权利要求1所述的一种堆叠三维码的生成方法,其特征在于,所述生成样式具体包括:2. A method for generating a stacked three-dimensional code according to claim 1, wherein the generating pattern specifically includes:左右样式,左右样式中二维码及点阵码呈左右分布在显示区域内;Left and right style, in the left and right style, the two-dimensional code and dot matrix code are distributed in the display area on the left and right;上下样式,上下样式中二维码及点阵码呈上下分布在显示区域内;Up and down style, in the up and down style, the QR code and dot matrix code are distributed up and down in the display area;内嵌样式,内嵌样式中二维码布置在显示区域的中央,且点阵码布置在二维码的中央;Embedded style, in the embedded style, the QR code is arranged in the center of the display area, and the dot matrix code is arranged in the center of the QR code;重叠样式,重叠样式中,二维码和点阵码均布置在显示区域的中央重叠在一起;Overlapping style, in the overlapping style, the two-dimensional code and the dot matrix code are arranged in the center of the display area and overlapped together;四周样式,四周样式中二维码布置在显示区域的中央,且点阵码布置在二维码的四周。Surrounding style. In the surrounding style, the two-dimensional code is arranged in the center of the display area, and the dot matrix code is arranged around the two-dimensional code.3.根据权利要求2所述的一种堆叠三维码的生成方法,其特征在于,所述印刷载体上设计的码区的形状为矩形,所述根据所述码区显示尺寸数据以及确定的生成样式,分别计算二维码和点阵码的尺寸数据和生成区域的方法具体为:3. A method for generating a stacked three-dimensional code according to claim 2, wherein the shape of the code area designed on the printed carrier is a rectangle, and the display size data and the determined generation of the code area are based on the code area. Style, the method of calculating the size data and generating area of the two-dimensional code and the dot matrix code respectively is as follows:当生成样式为左右样式时,从码区显示尺寸数据中获取短边的边长作为二维码的边长尺寸,根据二维码的边长尺寸生成一正方形的区域布置在码区的左方或右方作为二维码的生成区域,码区的剩余区域作为点阵码的生成区域;When the generated style is the left and right style, the length of the short side is obtained from the display size data of the code area as the side length size of the two-dimensional code, and a square area is generated according to the side length size of the two-dimensional code and arranged on the left side of the code area Or the right side is used as the generation area of the two-dimensional code, and the remaining area of the code area is used as the generation area of the dot matrix code;当生成样式为上下样式时,从码区显示尺寸数据中获取短边的边长作为二维码的边长尺寸,根据二维码的边长尺寸生成一正方形的区域布置在码区的上方或下方作为二维码的生成区域,码区的剩余区域作为点阵码的生成区域;When the generated style is the up-and-down style, the length of the short side is obtained from the display size data of the code area as the side length size of the two-dimensional code, and a square area is generated according to the side length size of the two-dimensional code and arranged on the top of the code area or The bottom is used as the generation area of the two-dimensional code, and the remaining area of the code area is used as the generation area of the dot matrix code;当生成样式为内嵌样式时,根据码区显示尺寸数据在码区的中心点以码区的短边的边长为二维码的边长,生成一正方形区域作为二维码的生成区域;根据选定的二维码的容错级别计算点阵码的边长,根据点阵码的边长在码区的中心点生成一正方形区域作为点阵码的生成区域;When the generated style is an embedded style, according to the code area display size data at the center point of the code area, the side length of the short side of the code area is the side length of the two-dimensional code, and a square area is generated as the two-dimensional code generation area; Calculate the side length of the dot matrix code according to the error tolerance level of the selected two-dimensional code, and generate a square area as the generation area of the dot matrix code at the center point of the code area according to the side length of the dot matrix code;当生成样式为重叠样式时,根据码区显示尺寸数据在码区的中心点以码区的短边的边长生成一正方形区域同时作为二维码和点阵码的生成区域;When the generated style is an overlapping style, a square area is generated at the center point of the code area with the length of the short side of the code area according to the display size data of the code area, and is simultaneously used as the generation area of the two-dimensional code and the dot matrix code;当生成样式为四周样式时,将码区的显示尺寸数据作为点阵码的尺寸数据,整个码区作为点阵码的生成区域;在码区的中心点以码区的短边的边长为二维码的边长,生成一正方形区域作为二维码的生成区域。When the generated style is the surrounding style, the display size data of the code area is used as the size data of the dot matrix code, and the entire code area is used as the generation area of the dot matrix code; at the center point of the code area, the length of the short side of the code area is The side length of the two-dimensional code generates a square area as the generation area of the two-dimensional code.4.根据权利要求2所述的一种堆叠三维码的生成方法,其特征在于,所述根据二维码的生码数据和尺寸数据生成对应尺寸的二维码的方法具体为:4. A method for generating a stacked three-dimensional code according to claim 2, wherein the method for generating a two-dimensional code of a corresponding size according to the raw code data and size data of the two-dimensional code is specifically:根据二维码的生码算法将二维码的生码数据转换为01矩阵;Convert the raw code data of the two-dimensional code into a 01 matrix according to the code-generating algorithm of the two-dimensional code;获取二维码的版本,得到所生成二维码的横向模块数;Obtain the version of the QR code, and obtain the number of horizontal modules of the generated QR code;根据模块数和二维码的尺寸数据计算每个模块的大小:Calculate the size of each module based on the number of modules and the size data of the QR code:W=L/NW=L/N其中,W为每个模块的边长,L为从二维码的尺寸数据获取的二维码边长,N为二维码的横向模块数;Wherein, W is the side length of each module, L is the side length of the two-dimensional code obtained from the size data of the two-dimensional code, and N is the number of horizontal modules of the two-dimensional code;将01矩阵进行映射放大,使黑白模块的边长均为W,生成所述对应尺寸的二维码。The 01 matrix is mapped and enlarged so that the length of the sides of the black and white modules is both W, and a two-dimensional code of the corresponding size is generated.5.根据权利要求2所述的一种堆叠三维码的生成方法,其特征在于,所述根据点阵码的生码数据和尺寸数据生成对应尺寸的点阵码的方法具体为:5. A method for generating a stacked three-dimensional code according to claim 2, wherein the method for generating a dot matrix code of a corresponding size according to raw code data and size data of the dot matrix code is specifically:根据点阵码的生码算法将点阵码的生码数据转换为点阵码;According to the raw code algorithm of the dot matrix code, the raw code data of the dot matrix code is converted into a dot matrix code;将点阵码输出为固定dpi的码图,dpi大于600,且码图面积大于通过点阵码尺寸数据计算出的点阵码生成区域的面积;Output the dot matrix code as a fixed dpi code map, where the dpi is greater than 600, and the area of the code map is greater than the area of the dot matrix code generation area calculated by the dot matrix code size data;保持码图的dpi不变,从码图中裁剪出与点阵码的尺寸数据相适应的小码图,拼接小裁剪出的小码图生成所述对应尺寸的点阵码。Keeping the dpi of the code map unchanged, cutting out a small code map suitable for the size data of the dot matrix code from the code map, and splicing the small code maps cut out to generate the dot matrix code of the corresponding size.6.根据权利要求2所述的一种堆叠三维码的生成方法,其特征在于,所述根据二维码和点阵码的生成区域将生成的二维码和点阵码填充至对应的生成区域并进行融合的方法具体为:6. A method for generating stacked three-dimensional codes according to claim 2, wherein the generated two-dimensional codes and dot matrix codes are filled into the corresponding generated two-dimensional codes and dot matrix codes according to the generation area of the two-dimensional codes and dot matrix codes. Regions and the method of fusion are as follows:若生成样式为左右样式或上下样式,则按二维码和点阵码的生成区域填充并显示生成的二维码及点阵码,融合方法为:If the generated style is left-right or top-bottom, fill and display the generated QR code and dot matrix code according to the generated area of the QR code and dot matrix code. The fusion method is:
Figure FDA0003841573050000041
Figure FDA0003841573050000041
若生成样式为内嵌样式,则先按照二维码的生成区域填充并显示生成的二维码,继续在生成的二维码内部的点阵码的生成区域填充并显示生成的点阵码,融合方法为:If the generated style is an embedded style, first fill and display the generated QR code according to the generated area of the QR code, and continue to fill and display the generated dot matrix code in the generated area of the dot matrix code inside the generated QR code, The fusion method is:
Figure FDA0003841573050000042
Figure FDA0003841573050000042
若生成样式为重叠样式,则先按照二维码的生成区域填充并显示生成的二维码,继续按照点阵码的生成区域填充并显示生成的点阵码,同时在生成的二维码的白色模块内显示点阵码,融合方法为:If the generated style is an overlapping style, first fill and display the generated QR code according to the generated area of the QR code, continue to fill and display the generated dot matrix code according to the generated area of the dot matrix code, and at the same time The dot matrix code is displayed in the white module, and the fusion method is:
Figure FDA0003841573050000043
Figure FDA0003841573050000043
若生成样式为四周样式,则先按照点阵码的生成区域填充并显示生成的点阵码,继续在生成的点阵码内部的二维码的生成区域填充并显示生成的二维码,融合方法为:If the generated style is the surrounding style, first fill and display the generated dot matrix code according to the generated area of the dot matrix code, continue to fill and display the generated QR code in the generated area of the QR code inside the generated dot matrix code, and integrate The method is:
Figure FDA0003841573050000044
Figure FDA0003841573050000044
其中,g(x,y)为融合后图像在横坐标为x,纵坐标为y的点的像素值;h(x,y)为生成的二维码在横坐标为x,纵坐标为y的点的像素值;f(x,y)为生成的点阵码在横坐标为x,纵坐标为y的点的像素值;D(h)为二维码的生成区域,D(f)为点阵码的生成区域。Among them, g(x, y) is the pixel value of the fused image at the point where the abscissa is x and the ordinate is y; h(x, y) is the generated two-dimensional code where the abscissa is x and the ordinate is y The pixel value of the point; f(x, y) is the pixel value of the generated dot matrix code at the point where the abscissa is x and the ordinate is y; D(h) is the generation area of the two-dimensional code, D(f) It is the generation area of dot matrix code.7.一种堆叠三维码的生成系统,其特征在于,包括:7. A generation system for stacking three-dimensional codes, comprising:生成样式确定模块,用于确定堆叠三维码的生成样式,所述生成样式为预先设定的二维码及点阵码在显示区域内的分布样式;A generation pattern determination module is used to determine the generation pattern of the stacked three-dimensional code, and the generation pattern is the distribution pattern of the preset two-dimensional code and the dot matrix code in the display area;显示尺寸获取模块,用于获取印刷载体上设计的码区显示尺寸数据;The display size acquisition module is used to obtain the display size data of the code area designed on the printing carrier;生成尺寸获取模块,用于根据所述码区显示尺寸数据以及确定的生成样式,分别计算二维码和点阵码的尺寸数据和生成区域;Generate a size acquisition module, used to calculate the size data and generation area of the two-dimensional code and the dot matrix code according to the size data displayed in the code area and the determined generation style;生码数据获取模块,用于获取二维码的生码数据和点阵码的生码数据;The raw code data acquisition module is used to obtain the raw code data of the two-dimensional code and the raw code data of the dot matrix code;生码模块,用于根据二维码的生码数据和尺寸数据生成对应尺寸的二维码,根据点阵码的生码数据和尺寸数据生成对应尺寸的点阵码;The raw code module is used to generate a two-dimensional code of a corresponding size according to the raw code data and size data of the two-dimensional code, and to generate a dot matrix code of a corresponding size according to the raw code data and the size data of the dot matrix code;融合模块,用于根据二维码和点阵码的生成区域将生成的二维码和点阵码填充至对应的生成区域并进行融合,完成融合后输出为堆叠三维码图。The fusion module is used to fill the generated two-dimensional code and dot matrix code into the corresponding generation area according to the generation area of the two-dimensional code and the dot matrix code and perform fusion, and output a stacked three-dimensional code map after the fusion is completed.8.一种电子设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述程序时实现如权利要求1至6任一项所述的一种堆叠三维码的生成方法。8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and operable on the processor, wherein the processor implements any of claims 1 to 6 when executing the program. A method for generating a stacked three-dimensional code described in the item.9.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现如权利要求1至6任一项所述的一种堆叠三维码的生成方法。9. A computer-readable storage medium, on which a computer program is stored, wherein when the program is executed by a processor, the method for generating a stacked three-dimensional code according to any one of claims 1 to 6 is realized.
CN202211103553.0A2022-09-092022-09-09Method, system, equipment and storage medium for generating stacked three-dimensional codePendingCN115456124A (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN202211103553.0ACN115456124A (en)2022-09-092022-09-09Method, system, equipment and storage medium for generating stacked three-dimensional code

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN202211103553.0ACN115456124A (en)2022-09-092022-09-09Method, system, equipment and storage medium for generating stacked three-dimensional code

Publications (1)

Publication NumberPublication Date
CN115456124Atrue CN115456124A (en)2022-12-09

Family

ID=84302291

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN202211103553.0APendingCN115456124A (en)2022-09-092022-09-09Method, system, equipment and storage medium for generating stacked three-dimensional code

Country Status (1)

CountryLink
CN (1)CN115456124A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117911049A (en)*2024-01-222024-04-19广州生命码科技有限公司Invisible intelligent code-based production date anti-counterfeiting tracing method and system

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103489026A (en)*2013-09-242014-01-01深圳市中选科技有限公司Colorful two-dimension code, generating method and generating system thereof and printed article
CN105224903A (en)*2015-09-282016-01-06郝迎喜A kind of method for anti-counterfeit of Quick Response Code and the reading device of Quick Response Code
CN108229596A (en)*2016-12-092018-06-29北京大码技术有限公司Combined two-dimension code, digital certificates carrier, generation, reading device and method
CN110378455A (en)*2018-04-132019-10-25乌镇中品安(桐乡)科技有限公司Anti-fake two-dimension code and its anti-counterfeiting authentication method
CN114881188A (en)*2022-05-182022-08-09广东依顿电子科技股份有限公司 A method for making a two-dimensional code for traceability of a circuit board

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN103489026A (en)*2013-09-242014-01-01深圳市中选科技有限公司Colorful two-dimension code, generating method and generating system thereof and printed article
CN105224903A (en)*2015-09-282016-01-06郝迎喜A kind of method for anti-counterfeit of Quick Response Code and the reading device of Quick Response Code
CN108229596A (en)*2016-12-092018-06-29北京大码技术有限公司Combined two-dimension code, digital certificates carrier, generation, reading device and method
CN110378455A (en)*2018-04-132019-10-25乌镇中品安(桐乡)科技有限公司Anti-fake two-dimension code and its anti-counterfeiting authentication method
CN114881188A (en)*2022-05-182022-08-09广东依顿电子科技股份有限公司 A method for making a two-dimensional code for traceability of a circuit board

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN117911049A (en)*2024-01-222024-04-19广州生命码科技有限公司Invisible intelligent code-based production date anti-counterfeiting tracing method and system

Similar Documents

PublicationPublication DateTitle
Wu et al.Steganography using reversible texture synthesis
Nishida et al.Example‐driven procedural urban roads
JP3199231B2 (en) Method and system for embedding information in three-dimensional shape model
US9919477B2 (en)Embedding a database in a physical object
US8681150B2 (en)Method, medium, and system with 3 dimensional object modeling using multiple view points
JP6331324B2 (en) Method and system for adding and confirming unique code for output object output from 3D printer
EP3313057B1 (en)A method and a computer product for joint color and translucency 3d printing and a joint color and translucency 3d printing device
US8550367B2 (en)System and method for embedding machine-readable codes in combination with other images such as logos
US20100328307A1 (en)Image processing apparatus and method
CN105051791B (en)Three-dimensional image output device and background image generating means
TW201543250A (en)A method for protecting 3d model file and system thereof
US8760722B2 (en)Apparatus and method for processing images
KR101877180B1 (en)Signature ID code technique for expressing artist information and work information of exhibition work based on signage
KR101507776B1 (en) methof for rendering outline in three dimesion map
CN115456124A (en)Method, system, equipment and storage medium for generating stacked three-dimensional code
CN103858136B (en)Light reads code preparation device
Wu et al.Building reconstruction from high-resolution multiview aerial imagery
Lafaye et al.Blind and squaring-resistant watermarking of vectorial building layers
CN115272059A (en)Remote sensing image desensitization method based on double driving of text and historical image
Qin et al.Precise vector textures for real-time 3D rendering
CN118485762A (en) A method for filling image holes based on second-order adversarial model
JP4425734B2 (en) How to provide a vector image with hidden lines removed
Ma et al.Learning across views for stereo image completion
Liu et al.Generating classic mosaics with graph cuts
CN108509673A (en)A method of the tread contour piecemeal Hai Lu based on image processing techniques is than calculating

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination

[8]ページ先頭

©2009-2025 Movatter.jp