CN108776828A - Two-dimensional code generation method, Quick Response Code generating means and Quick Response Code - Google Patents

Two-dimensional code generation method, Quick Response Code generating means and Quick Response Code Download PDF

Info

Publication number
CN108776828A
CN108776828A CN201810580196.4A CN201810580196A CN108776828A CN 108776828 A CN108776828 A CN 108776828A CN 201810580196 A CN201810580196 A CN 201810580196A CN 108776828 A CN108776828 A CN 108776828A
Authority
CN
China
Prior art keywords
positioning
data
dimensional code
points
peripheral
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.)
Granted
Application number
CN201810580196.4A
Other languages
Chinese (zh)
Other versions
CN108776828B (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.)
China United Network Communications Group Co Ltd
Original Assignee
China United Network Communications Group 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 China United Network Communications Group Co Ltd filed Critical China United Network Communications Group Co Ltd
Priority to CN201810580196.4A priority Critical patent/CN108776828B/en
Publication of CN108776828A publication Critical patent/CN108776828A/en
Application granted granted Critical
Publication of CN108776828B publication Critical patent/CN108776828B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K19/00Record carriers for use with machines and with at least a part designed to carry digital markings
    • G06K19/06Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code
    • G06K19/06009Record carriers for use with machines and with at least a part designed to carry digital markings characterised by the kind of the digital marking, e.g. shape, nature, code with optically detectable marking
    • G06K19/06046Constructional details
    • G06K19/06131Constructional details the marking comprising a target pattern, e.g. for indicating the center of the bar code or for helping a bar code reader to properly orient the scanner or to retrieve the bar code inside of an image

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Image Analysis (AREA)

Abstract

本发明提供一种二维码的生成方法,其中,生成方法包括:确定多个定位点的位置,其中,多个定位点包括中心定位点和多个周边定位点,多个周边定位点均匀分布在同一个圆的圆周上,中心定位点位于圆的圆心处;在中心定位点处设置中心定位图形,中心定位图形限定夹角,夹角指向其中一个周边定位点;在周边定位点设置周边定位图形;确定多条数据线的位置,每条数据线对应一个周边定位点,且数据线连接该数据线对应的周边定位点与中心定位点;分别在各条数据线上设置图形数据图形,以获得二维码。本发明还提供一种二维码、一种二维码生成装置。二维码生成方法生成的二维码中,即便发生定位点磨损,仍然能够准确的读取二维码信息。

The present invention provides a method for generating a two-dimensional code, wherein the generating method includes: determining the positions of multiple positioning points, wherein the multiple positioning points include a central positioning point and multiple surrounding positioning points, and the multiple surrounding positioning points are evenly distributed On the circumference of the same circle, the central positioning point is located at the center of the circle; the central positioning graphic is set at the central positioning point, and the central positioning graphic defines the included angle, and the included angle points to one of the peripheral positioning points; the peripheral positioning is set at the peripheral positioning point Graphics; determine the position of multiple data lines, each data line corresponds to a peripheral positioning point, and the data line connects the peripheral positioning point and the central positioning point corresponding to the data line; set the graphic data graphics on each data line respectively, so as to Get the QR code. The invention also provides a two-dimensional code and a two-dimensional code generating device. In the two-dimensional code generated by the two-dimensional code generation method, even if the positioning point is worn, the two-dimensional code information can still be read accurately.

Description

二维码生成方法、二维码生成装置和二维码Two-dimensional code generation method, two-dimensional code generation device and two-dimensional code

技术领域technical field

本发明涉及图形识别码领域,具体地,涉及一种二维码生成方法、一种二维码生成装置和一种二维码。The present invention relates to the field of graphic identification codes, in particular to a two-dimensional code generation method, a two-dimensional code generation device and a two-dimensional code.

背景技术Background technique

常见的二维码为方形二维码,一个二维码包括三个定位点,该三个定位点分别位于二维码的三个角上。一旦三个定位点中的任意一个或者几个受到损毁,则会导致该二维码无法被准确识别。A common two-dimensional code is a square two-dimensional code, and one two-dimensional code includes three positioning points, and the three positioning points are respectively located at three corners of the two-dimensional code. Once any one or several of the three positioning points are damaged, the two-dimensional code cannot be accurately recognized.

二维码通常设置在产品的外包装上,因此,很难避免二维码被损坏。The QR code is usually set on the outer packaging of the product, therefore, it is difficult to prevent the QR code from being damaged.

因此,如何防止二维码被损坏成为本领域亟待解决的技术问题。Therefore, how to prevent the two-dimensional code from being damaged has become an urgent technical problem in this field.

发明内容Contents of the invention

本发明的目的在于提供一种二维码生成方法、一种二维码生成装置和一种二维码。即便二维码中的定位点中的任意一个或任意几个被损毁,仍然不妨碍对所述二维码的识别。The purpose of the present invention is to provide a two-dimensional code generation method, a two-dimensional code generation device and a two-dimensional code. Even if any one or several of the positioning points in the two-dimensional code is damaged, it still does not hinder the recognition of the two-dimensional code.

为了实现上述目的,作为本发明的一个方面,提供一种二维码的生成方法,其中,所述生成方法包括:In order to achieve the above object, as an aspect of the present invention, a method for generating a two-dimensional code is provided, wherein the method for generating includes:

确定多个定位点的位置,其中,多个所述定位点包括中心定位点和多个周边定位点,多个所述周边定位点均匀分布在同一个圆的圆周上,所述中心定位点位于所述圆的圆心处;Determine the positions of multiple anchor points, wherein the multiple anchor points include a central anchor point and a plurality of peripheral anchor points, and the plurality of peripheral anchor points are evenly distributed on the circumference of the same circle, and the central anchor point is located at at the center of said circle;

在所述中心定位点处设置中心定位图形,所述中心定位图形限定夹角,所述夹角指向其中一个所述周边定位点;A central positioning figure is set at the central positioning point, the central positioning figure defines an included angle, and the included angle points to one of the peripheral positioning points;

在所述周边定位点设置周边定位图形;Setting peripheral positioning graphics at the peripheral positioning points;

确定多条数据线的位置,每条所述数据线对应一个所述周边定位点,且所述数据线连接该数据线对应的周边定位点与所述中心定位点;determining the positions of multiple data lines, each of the data lines corresponds to one of the peripheral positioning points, and the data lines connect the peripheral positioning points corresponding to the data lines with the central positioning point;

分别在各条所述数据线上设置图形数据图形,以获得所述二维码。Setting graphic data graphics on each of the data lines to obtain the two-dimensional code.

优选地,所述二维码包括八个周边定位点,每个所述周边定位图形均包括三个像素,且八个所述周边定位点中三个像素的排列方式各不相同。Preferably, the two-dimensional code includes eight peripheral positioning points, each of the peripheral positioning graphics includes three pixels, and the arrangements of the three pixels in the eight peripheral positioning points are different.

优选地,每条所述数据线上的数据图形均包括八个像素,所述数据图形包括四组主数据和四组备份数据,每组所述主数据对应一组所述备份数据,且所述主数据与所述备份数据的内容相同。Preferably, the data graphics on each of the data lines include eight pixels, the data graphics include four sets of main data and four sets of backup data, each set of main data corresponds to a set of backup data, and the The main data and the backup data have the same content.

作为本发明的第二个方面,提供一种二维码,其中,所述二维码包括:As a second aspect of the present invention, a two-dimensional code is provided, wherein the two-dimensional code includes:

多个周边定位图形,多个所述周边定位图形分布在同一个圆的圆周上;A plurality of peripheral positioning figures, a plurality of said peripheral positioning figures are distributed on the circumference of the same circle;

中心定位图形,所述中心定位图形位于所述圆的圆心处,且所述中心定位图形限定夹角,所述夹角指向其中一个所述周边定位点;a central positioning figure, the central positioning figure is located at the center of the circle, and the central positioning figure defines an included angle, and the included angle points to one of the peripheral positioning points;

多个数据图形,多个所述数据图形分别分布在多条数据线上,每条所述数据线对应一个所述周边定位图形,且所述数据线连接该数据线对应的周边定位图形与所述中心定位图形。A plurality of data graphics, a plurality of the data graphics are respectively distributed on a plurality of data lines, each of the data lines corresponds to one of the peripheral positioning graphics, and the data lines are connected to the peripheral positioning graphics corresponding to the data line and the Describe the central positioning graphics.

优选地,所述二维码包括八个周边定位点,每个所述周边定位图形均包括三个像素,且八个所述周边定位点中三个像素的排列方式各不相同。Preferably, the two-dimensional code includes eight peripheral positioning points, each of the peripheral positioning graphics includes three pixels, and the arrangements of the three pixels in the eight peripheral positioning points are different.

优选地,每条所述数据线上的数据图形均包括八个像素,所述数据图形包括四组主数据和四组备份数据,每组所述主数据对应一组所述备份数据,且所述主数据与所述备份数据的内容相同。Preferably, the data graphics on each of the data lines include eight pixels, the data graphics include four sets of main data and four sets of backup data, each set of main data corresponds to a set of backup data, and the The main data and the backup data have the same content.

作为本发明的第三个方面,提供一种二维码生成装置,其中,所述二维码生成装置包括:As a third aspect of the present invention, a two-dimensional code generating device is provided, wherein the two-dimensional code generating device includes:

定位点确定模块,所述定位点确定模块用于确定多个定位点的位置,其中,多个所述定位点包括中心定位点和多个周边定位点,多个所述周边定位点均匀分布在同一个圆的圆周上,所述中心定位点位于所述圆的圆心处;An anchor point determination module, the anchor point determination module is used to determine the positions of a plurality of anchor points, wherein the plurality of anchor points include a central anchor point and a plurality of peripheral anchor points, and the plurality of peripheral anchor points are evenly distributed in On the circumference of the same circle, the central positioning point is located at the center of the circle;

定位图形设置模块,所述定位图形确定模块用于在所述中心定位点处设置中心定位图形,所述中心定位图形限定夹角,所述夹角指向其中一个所述周边定位点,并且所述定位图形设置模块还用于在所述周边定位点设置周边定位图形;A positioning figure setting module, the positioning figure determination module is used to set a central positioning figure at the central positioning point, the central positioning figure defines an included angle, and the included angle points to one of the surrounding positioning points, and the The positioning figure setting module is also used to set surrounding positioning figures at the surrounding positioning points;

数据线确定模块,所述数据线确定模块用于确定多条数据线的位置,每条所述数据线对应一个所述周边定位点,且所述数据线连接该数据线对应的周边定位点与所述中心定位点;A data line determination module, the data line determination module is used to determine the positions of multiple data lines, each of the data lines corresponds to one of the peripheral positioning points, and the data lines are connected to the peripheral positioning points corresponding to the data lines and said central anchor point;

数据图形设置模块,所述数据图形设置模块用于分别在各条所述数据线上设置图形数据图形,以获得所述二维码。A data graphic setting module, the data graphic setting module is used to respectively set graphic data graphics on each of the data lines to obtain the two-dimensional code.

优选地,所述二维码包括八个周边定位点,每个所述周边定位图形均包括三个像素,且八个所述周边定位点中三个像素的排列方式各不相同。Preferably, the two-dimensional code includes eight peripheral positioning points, each of the peripheral positioning graphics includes three pixels, and the arrangements of the three pixels in the eight peripheral positioning points are different.

优选地,每条所述数据线上的数据图形均包括八个像素,所述数据图形包括四组主数据和四组备份数据,每组所述主数据对应一组所述备份数据,且所述主数据与所述备份数据的内容相同。Preferably, the data graphics on each of the data lines include eight pixels, the data graphics include four sets of main data and four sets of backup data, each set of main data corresponds to a set of backup data, and the The main data and the backup data have the same content.

在利用本发明所提供的二维码生成方法中,多个周边定位图形设置在圆周上,并且,由于多个定位图形是沿圆周均匀分布的,因此,即便其中一个或多个定位图形受损,仍然可以根据其他的定位图形来确定该受损的定位图形的位置信息,进而获取该定位图形所对应的数据图形。In the two-dimensional code generation method provided by the present invention, a plurality of peripheral positioning figures are arranged on the circumference, and since the plurality of positioning figures are uniformly distributed along the circumference, even if one or more positioning figures are damaged , the position information of the damaged positioning figure can still be determined according to other positioning figures, and then the data figure corresponding to the positioning figure can be obtained.

即便周边定位图形全部受损,根据中心定位图形仍然可以确定其中的一个周边定位图形的位置,然后推出其余周边定位图形的位置。Even if all the peripheral positioning graphics are damaged, the position of one of the peripheral positioning graphics can still be determined according to the central positioning graphics, and then the positions of the remaining peripheral positioning graphics can be deduced.

在识别本发明所提供的二维码生成方法所生成的二维码时,周边定位图形中的任意一者或者任意几者发生破损或污损,都可以利用未发生破损的定位图形来确定破损或污损的定位图形的位置,从而可以确定各条数据线的位置,进而可以识别二维码中的信息。When identifying the two-dimensional code generated by the two-dimensional code generation method provided by the present invention, if any one or any of the surrounding positioning patterns is damaged or stained, the damage can be determined by using the non-damaged positioning pattern Or the position of the defaced positioning graphic, so that the position of each data line can be determined, and then the information in the two-dimensional code can be identified.

换言之,只要存在一个未损毁的定位图像,即可对二维码进行定位和数据读取。In other words, as long as there is an undamaged positioning image, the two-dimensional code can be positioned and data read.

附图说明Description of drawings

附图是用来提供对本发明的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本发明,但并不构成对本发明的限制。在附图中:The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the description, together with the following specific embodiments, are used to explain the present invention, but do not constitute a limitation to the present invention. In the attached picture:

图1是本发明所提供的二维码生成方法的流程图;Fig. 1 is the flowchart of the two-dimension code generation method provided by the present invention;

图2是本发明所提供的二维码中定位点和数据线的示意图;Fig. 2 is a schematic diagram of positioning points and data lines in the two-dimensional code provided by the present invention;

图3a是一条数据线上的数据图形;Figure 3a is a data graph on a data line;

图3b是另一条数据线上的数据图形;Figure 3b is a data graph on another data line;

图4是本发明所提供的二维码生成装置的模块示意图。Fig. 4 is a block diagram of a two-dimensional code generating device provided by the present invention.

附图标记说明Explanation of reference signs

410:定位点确定模块 420:定位图形设置模块410: positioning point determination module 420: positioning graphics setting module

430:数据线确定模块 440:数据图形设置模块430: Data line determination module 440: Data graphics setting module

具体实施方式Detailed ways

以下结合附图对本发明的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本发明,并不用于限制本发明。Specific embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. It should be understood that the specific embodiments described here are only used to illustrate and explain the present invention, and are not intended to limit the present invention.

作为本发明的一个方面,提供一种二维码的生成方法,其中,如图1所示,所述生成方法包括:As an aspect of the present invention, a method for generating a two-dimensional code is provided, wherein, as shown in FIG. 1 , the method for generating includes:

在步骤S110中,确定多个定位点的位置,其中,多个所述定位点包括中心定位点和多个周边定位点,多个所述周边定位点均匀分布在同一个圆的圆周上,所述中心定位点位于所述圆的圆心处;In step S110, the positions of a plurality of anchor points are determined, wherein the plurality of anchor points include a central anchor point and a plurality of peripheral anchor points, and the plurality of peripheral anchor points are evenly distributed on the circumference of the same circle, so The central positioning point is located at the center of the circle;

在步骤S120中,在所述中心定位点处设置中心定位图形,所述中心定位图形限定夹角,所述夹角指向其中一个所述周边定位点;In step S120, a central positioning figure is set at the central positioning point, the central positioning figure defines an included angle, and the included angle points to one of the peripheral positioning points;

在步骤S130中,在所述周边定位点设置周边定位图形;In step S130, setting peripheral positioning graphics at the peripheral positioning points;

在步骤S140中,确定多条数据线的位置,每条所述数据线对应一个所述周边定位点,且所述数据线连接该数据线对应的周边定位点与所述中心定位点;In step S140, the positions of multiple data lines are determined, each of the data lines corresponds to one of the peripheral positioning points, and the data lines connect the peripheral positioning points corresponding to the data lines with the central positioning point;

在步骤S150中,分别在各条所述数据线上设置图形数据图形,以获得所述二维码。In step S150, graphic data graphics are respectively set on each of the data lines to obtain the two-dimensional code.

在利用本发明所提供的二维码生成方法中,多个周边定位图形设置在圆周上,并且,由于多个定位图形是沿圆周均匀分布的,因此,即便其中一个或多个定位图形受损,仍然可以根据其他的定位图形来确定该受损的定位图形的位置信息,进而获取该定位图形所对应的数据图形。In the two-dimensional code generation method provided by the present invention, a plurality of peripheral positioning figures are arranged on the circumference, and since the plurality of positioning figures are uniformly distributed along the circumference, even if one or more positioning figures are damaged , the position information of the damaged positioning figure can still be determined according to other positioning figures, and then the data figure corresponding to the positioning figure can be obtained.

即便周边定位图形全部受损,根据中心定位图形仍然可以确定其中的一个周边定位图形的位置,然后推出其余周边定位图形的位置。Even if all the peripheral positioning graphics are damaged, the position of one of the peripheral positioning graphics can still be determined according to the central positioning graphics, and then the positions of the remaining peripheral positioning graphics can be deduced.

在识别本发明所提供的二维码生成方法所生成的二维码时,周边定位图形中的任意一者或者任意几者发生破损或污损,都可以利用未发生破损的定位图形来确定破损或污损的定位图形的位置,从而可以确定各条数据线的位置,进而可以识别二维码中的信息。When identifying the two-dimensional code generated by the two-dimensional code generation method provided by the present invention, if any one or any of the surrounding positioning patterns is damaged or stained, the damage can be determined by using the non-damaged positioning pattern Or the position of the defaced positioning graphic, so that the position of each data line can be determined, and then the information in the two-dimensional code can be identified.

换言之,只要存在一个未损毁的定位图形,即可对二维码进行定位和数据读取。In other words, as long as there is an undamaged positioning pattern, the two-dimensional code can be positioned and data read.

与现有技术中“尽量确保二维码不受损坏”不同,在本申请所提供的二维码生成方法生成的二维码中,对该二维码的设置位置并没有要求,即便设置在易磨损的位置导致二维码磨损,仍然能够准确地识别出二维码的信息。Different from the prior art of "trying to ensure that the two-dimensional code is not damaged", in the two-dimensional code generated by the two-dimensional code generation method provided in this application, there is no requirement for the setting position of the two-dimensional code, even if it is set at The position that is easy to wear causes the two-dimensional code to wear, and the information of the two-dimensional code can still be accurately recognized.

例如,可以将所述二维码设置在共享单车上。由于即便发生磨损仍然能够识别所述二维码,因此,可以将所述二维码设置在明显位置,从而便于用户扫描,提高用户体验。For example, the two-dimensional code can be set on the shared bicycle. Since the two-dimensional code can still be recognized even if it is worn out, the two-dimensional code can be set in an obvious position, so that it is convenient for the user to scan and improve the user experience.

利用本发明所提供的二维码的生成方法可以生成如图2中所示的图形二维码。The graphic two-dimensional code shown in FIG. 2 can be generated by using the two-dimensional code generation method provided by the present invention.

在该实施方式中,二维码包括八个周边定位点,分别为周边定位点P1、周边定位点P2、周边定位点P3、周边定位点P4、周边定位点P5、周边定位点P6、周边定位点P7和周边定位点P8。如图2中所示,中心定位点P0位于圆心处,八条数据线分别为连接周边定位点P1和中心定位点P0的数据线D1、连接周边定位点P2和中心定位点P0的数据线D2、连接周边定位点P3和中心定位点P0的数据线D3、连接周边定位点P4和中心定位点P0的数据线D4、连接周边定位点P5和中心定位点P0的数据线D5、连接周边定位点P6和中心定位点P0的数据线D6、连接周边定位点P7和中心定位点P0的数据线D7和连接周边定位点P8和中心定位点P0的数据线D8。In this embodiment, the two-dimensional code includes eight surrounding positioning points, which are respectively surrounding positioning point P1, surrounding positioning point P2, surrounding positioning point P3, surrounding positioning point P4, surrounding positioning point P5, surrounding positioning point P6, surrounding positioning point Point P7 and surrounding locate point P8. As shown in Figure 2, the central positioning point P0 is located at the center of the circle, and the eight data lines are respectively the data line D1 connecting the peripheral positioning point P1 and the central positioning point P0, the data line D2 connecting the peripheral positioning point P2 and the central positioning point P0, The data line D3 connecting the peripheral positioning point P3 and the central positioning point P0, the data line D4 connecting the peripheral positioning point P4 and the central positioning point P0, the data line D5 connecting the peripheral positioning point P5 and the central positioning point P0, and the peripheral positioning point P6 The data line D6 connecting the central positioning point P0, the data line D7 connecting the peripheral positioning point P7 and the central positioning point P0, and the data line D8 connecting the peripheral positioning point P8 and the central positioning point P0.

在图2中所示的具体实施方式中,中心定位点P0处的中心图形包括两个扇形,该两个扇形共用水平的直径,因此,可以由中心图形确定出周边定位点P1的位置。In the specific embodiment shown in FIG. 2 , the central graphic at the central positioning point P0 includes two sectors, and the two sectors share a horizontal diameter. Therefore, the position of the peripheral positioning point P1 can be determined from the central graphic.

如上文中所述,所述二维码包括八个周边定位点。为了确保八个定位点的定位图形互不相同,优选地,如图2所示,每个所述周边定位图形均包括三个像素,且八个所述周边定位点中三个像素的排列方式各不相同。As mentioned above, the two-dimensional code includes eight peripheral positioning points. In order to ensure that the positioning figures of the eight positioning points are different from each other, preferably, as shown in Figure 2, each of the surrounding positioning figures includes three pixels, and the arrangement of the three pixels in the eight surrounding positioning points vary.

相应地,每条所述数据线上的数据图形均包括八个像素。换言之,每条数据线均为二进制像素数据。图3a中表示的是00000000,图3b中表示的是00100101。所述数据图形包括四组主数据和四组备份数据,每组所述主数据对应一组所述备份数据,且所述主数据与所述备份数据的内容相同。在图2中所示的具体实施方式中,在数据线D1、数据线D2、数据线D3、数据线D4上设置主数据。在数据线D5、数据线D6、数据线D7和数据线D8上设置备份数据。其中,数据线D1上的主数据与数据线D5上的备份数据相同,数据线D2上的主数据与数据线D6上的备份数据相同,数据线D3上的主数据与数据线D7上的备份数据相同,数据线D4上的主数据与数据线D8上的备份数据相同。Correspondingly, the data pattern on each of the data lines includes eight pixels. In other words, each data line is binary pixel data. Figure 3a shows 00000000 and Figure 3b shows 00100101. The data graph includes four sets of main data and four sets of backup data, each set of the main data corresponds to a set of the backup data, and the contents of the main data and the backup data are the same. In the specific embodiment shown in FIG. 2, the main data is set on the data line D1, the data line D2, the data line D3, and the data line D4. Backup data is set on the data line D5, the data line D6, the data line D7 and the data line D8. Among them, the main data on the data line D1 is the same as the backup data on the data line D5, the main data on the data line D2 is the same as the backup data on the data line D6, the main data on the data line D3 is the same as the backup data on the data line D7 The data is the same, the main data on the data line D4 is the same as the backup data on the data line D8.

当二维码包括八个周边定位图形以及八个数据图形时,携带的数据信息量有限,因此,适合利用所述二维码做身份识别图形。例如,可以利用所述二维码作为共享单车的身份识别码。共享单车的发行量在1亿辆以内,将所述二位码印刷在共享单车的大梁上,每个数据图形共8Byte的数据量,表示共享单车的ID。所述二维码可以表示从0到4294967295的数字。When the two-dimensional code includes eight peripheral positioning patterns and eight data patterns, the amount of data information carried is limited, therefore, it is suitable to use the two-dimensional code as an identity recognition pattern. For example, the two-dimensional code can be used as the identification code of the shared bicycle. If the circulation of shared bicycles is less than 100 million, the two-digit code is printed on the girder of shared bicycles, and each data pattern has a total data volume of 8 bytes, representing the ID of shared bicycles. The two-dimensional code can represent numbers from 0 to 4294967295.

作为本发明的另一个方面,提供一种利用上述二维码生成方法生成的二维码,其中,所述二维码包括:As another aspect of the present invention, there is provided a two-dimensional code generated by the above two-dimensional code generation method, wherein the two-dimensional code includes:

多个周边定位图形,多个所述周边定位图形分布在同一个圆的圆周上;A plurality of peripheral positioning figures, a plurality of said peripheral positioning figures are distributed on the circumference of the same circle;

中心定位图形,所述中心定位图形位于所述圆的圆心处,且所述中心定位图形限定夹角,所述夹角指向其中一个所述周边定位图形;a central positioning figure, the central positioning figure is located at the center of the circle, and the central positioning figure defines an included angle, and the included angle points to one of the peripheral positioning figures;

多个数据图形,多个所述数据图形分别分布在多条数据线上,任意一条所述数据线均为所述圆的直径,且所述数据线的两端分别为两个不同的所述周边定位图形。A plurality of data graphics, a plurality of said data graphics are respectively distributed on a plurality of data lines, any one of said data lines is the diameter of said circle, and the two ends of said data lines are respectively two different said Peripheral positioning graphics.

所述二维码是由本发明所提供的上述二维码生成方法生成的,如上文中所述,多个周边定位图形设置在圆周上,并且,由于多个定位图形是沿圆周均匀分布的,因此,即便其中一个或多个定位图形受损,仍然可以根据其他的定位图形来确定该受损的定位图形的位置信息,进而获取该定位图形所对应的数据图形。The two-dimensional code is generated by the above-mentioned two-dimensional code generation method provided by the present invention. As mentioned above, a plurality of peripheral positioning figures are arranged on the circumference, and since the multiple positioning figures are evenly distributed along the circumference, therefore , even if one or more of the positioning patterns is damaged, the location information of the damaged positioning pattern can still be determined according to other positioning patterns, and then the data pattern corresponding to the positioning pattern can be obtained.

即便周边定位图形全部受损,根据中心定位图形仍然可以确定其中的一个周边定位图形的位置,然后推出其余周边定位图形的位置。Even if all the peripheral positioning graphics are damaged, the position of one of the peripheral positioning graphics can still be determined according to the central positioning graphics, and then the positions of the remaining peripheral positioning graphics can be deduced.

与现有技术中“尽量确保二维码不受损坏”不同,在本申请所提供的二维码生成方法生成的二维码中,对该二维码的设置位置并没有要求,即便设置在易磨损的位置导致二维码磨损,仍然能够准确地识别出二维码的信息。Different from the prior art of "trying to ensure that the two-dimensional code is not damaged", in the two-dimensional code generated by the two-dimensional code generation method provided in this application, there is no requirement for the setting position of the two-dimensional code, even if it is set at The position that is easy to wear causes the two-dimensional code to wear, and the information of the two-dimensional code can still be accurately recognized.

例如,可以将所述二维码设置在共享单车上。由于即便发生磨损仍然能够识别所述二维码,因此,可以将所述二维码设置在明显位置,从而便于用户扫描,提高用户体验。For example, the two-dimensional code can be set on the shared bicycle. Since the two-dimensional code can still be recognized even if it is worn out, the two-dimensional code can be set in an obvious position, so that it is convenient for the user to scan and improve the user experience.

作为一种具体实施方式,所述二维码包括八个周边定位图形,每个所述周边定位图形均包括三个像素,且八个所述周边定位图形中三个像素的排列方式各不相同。As a specific implementation, the two-dimensional code includes eight peripheral positioning patterns, each of which includes three pixels, and the arrangements of the three pixels in the eight peripheral positioning patterns are different .

如图2所示,每个所述周边定位图形均包括三个像素,且八个所述周边定位图形中三个像素的排列方式各不相同。As shown in FIG. 2 , each of the surrounding positioning patterns includes three pixels, and the arrangement of the three pixels in the eight surrounding positioning patterns is different.

相应地,每条所述数据线上的数据图形均包括八个像素。换言之,每条数据线均为二进制像素数据。图3a中表示的是00000000,图3b中表示的是00100101。Correspondingly, the data pattern on each of the data lines includes eight pixels. In other words, each data line is binary pixel data. Figure 3a shows 00000000 and Figure 3b shows 00100101.

当二维码包括八个周边定位图形以及八个数据图形时,携带的数据信息量有限,因此,适合利用所述二维码做身份识别图形。When the two-dimensional code includes eight peripheral positioning patterns and eight data patterns, the amount of data information carried is limited, therefore, it is suitable to use the two-dimensional code as an identity recognition pattern.

在用户扫描所述二维码时,首先对二维码进行图形矫正,将摄像头拍摄到的非正圆的二维码矫正成正圆形。然后再确定各个周边定位图形的位置,并进一步读取处数据信息。When the user scans the two-dimensional code, the two-dimensional code is firstly corrected, and the non-circular two-dimensional code captured by the camera is corrected into a perfect circle. Then determine the position of each peripheral positioning figure, and further read the data information.

作为本发明的第三个方面,提供一种二维码生成装置,其中,如图4所示,所述二维码生成装置包括定位点确定模块410、定位图形设置模块420、数据线确定模块430和数据图形设置模块440。本发明所提供的二维码生成装置用于执行本发明所提供的上述二维码生成方法。As a third aspect of the present invention, a two-dimensional code generating device is provided, wherein, as shown in FIG. 430 and a data graphics setting module 440. The two-dimensional code generation device provided by the present invention is used to execute the above-mentioned two-dimensional code generation method provided by the present invention.

具体地,定位点确定模块410用于执行步骤S110,即,定位点确定模块410用于确定多个定位点的位置,其中,多个所述定位点包括中心定位点和多个周边定位点,多个所述周边定位点均匀分布在同一个圆的圆周上,所述中心定位点位于所述圆的圆心处。Specifically, the positioning point determining module 410 is used to execute step S110, that is, the positioning point determining module 410 is used to determine the positions of multiple positioning points, wherein the multiple positioning points include a central positioning point and a plurality of peripheral positioning points, A plurality of the peripheral positioning points are evenly distributed on the circumference of the same circle, and the central positioning point is located at the center of the circle.

定位图形设置模块420用于执行步骤S120和步骤S130,即,定位图形确定模块420用于在所述中心定位点处设置中心定位图形,所述中心定位图形限定夹角,所述夹角指向其中一个所述周边定位点,并且定位图形设置模块420还用于在所述周边定位点设置周边定位图形。The positioning figure setting module 420 is used to execute step S120 and step S130, that is, the positioning figure determination module 420 is used to set a central positioning figure at the central positioning point, the central positioning figure defines an included angle, and the included angle points to it One of the surrounding positioning points, and the positioning figure setting module 420 is further configured to set a surrounding positioning figure at the surrounding positioning points.

数据线确定模块430用于执行步骤S140,即,数据线确定模块330用于所述数据线确定模块用于确定多条数据线的位置,每条所述数据线对应一个所述周边定位点,且所述数据线连接该数据线对应的周边定位点与所述中心定位点。The data line determination module 430 is used to execute step S140, that is, the data line determination module 330 is used for the data line determination module to determine the positions of multiple data lines, and each data line corresponds to one of the peripheral positioning points, And the data line connects the peripheral positioning point corresponding to the data line and the central positioning point.

数据图形设置模块440用于执行步骤S150,即,数据图形设置模块440用于分别在各条所述数据线上设置图形数据图形,以获得所述二维码。The data pattern setting module 440 is used to execute step S150, that is, the data pattern setting module 440 is used to respectively set a graphic data pattern on each of the data lines to obtain the two-dimensional code.

本发明所提供的二维码生成装置用于执行本发明所提供的上述二维码生成方法,上文中已经详细介绍所述二维码生成方法的工作原理以及有益效果,这里不再赘述。The two-dimensional code generation device provided by the present invention is used to implement the above-mentioned two-dimensional code generation method provided by the present invention. The working principle and beneficial effects of the two-dimensional code generation method have been introduced in detail above, and will not be repeated here.

如上文中所述,作为一种具体实施方式,所述二维码包括八个周边定位点,每个所述周边定位图形均包括三个像素,且八个所述周边定位点中三个像素的排列方式各不相同。As mentioned above, as a specific implementation, the two-dimensional code includes eight peripheral positioning points, each of the peripheral positioning graphics includes three pixels, and the three pixels in the eight peripheral positioning points Arrangements vary.

相应地,每条所述数据线上的数据图形均包括八个像素,所述数据图形包括四组主数据和四组备份数据,每组所述主数据对应一组所述备份数据,且所述主数据与所述备份数据的内容相同。Correspondingly, the data graphics on each of the data lines include eight pixels, the data graphics include four sets of main data and four sets of backup data, each set of main data corresponds to a set of backup data, and the The main data and the backup data have the same content.

可以理解的是,以上实施方式仅仅是为了说明本发明的原理而采用的示例性实施方式,然而本发明并不局限于此。对于本领域内的普通技术人员而言,在不脱离本发明的精神和实质的情况下,可以做出各种变型和改进,这些变型和改进也视为本发明的保护范围。It can be understood that, the above embodiments are only exemplary embodiments adopted for illustrating the principle of the present invention, but the present invention is not limited thereto. For those skilled in the art, various modifications and improvements can be made without departing from the spirit and essence of the present invention, and these modifications and improvements are also regarded as the protection scope of the present invention.

Claims (9)

1.一种二维码的生成方法,其特征在于,所述生成方法包括:1. A generating method of a two-dimensional code, characterized in that, the generating method comprises: 确定多个定位点的位置,其中,多个所述定位点包括中心定位点和多个周边定位点,多个所述周边定位点均匀分布在同一个圆的圆周上,所述中心定位点位于所述圆的圆心处;Determine the positions of multiple anchor points, wherein the multiple anchor points include a central anchor point and a plurality of peripheral anchor points, and the plurality of peripheral anchor points are evenly distributed on the circumference of the same circle, and the central anchor point is located at at the center of said circle; 在所述中心定位点处设置中心定位图形,所述中心定位图形限定夹角,所述夹角指向其中一个所述周边定位点;A central positioning figure is set at the central positioning point, the central positioning figure defines an included angle, and the included angle points to one of the peripheral positioning points; 在所述周边定位点设置周边定位图形;Setting peripheral positioning graphics at the peripheral positioning points; 确定多条数据线的位置,每条所述数据线对应一个所述周边定位点,且所述数据线连接该数据线对应的周边定位点与所述中心定位点;determining the positions of multiple data lines, each of the data lines corresponds to one of the peripheral positioning points, and the data lines connect the peripheral positioning points corresponding to the data lines with the central positioning point; 分别在各条所述数据线上设置图形数据图形,以获得所述二维码。Setting graphic data graphics on each of the data lines to obtain the two-dimensional code. 2.根据权利要求1所述的二维码生成方法,其特征在于,所述二维码包括八个周边定位点,每个所述周边定位图形均包括三个像素,且八个所述周边定位点中三个像素的排列方式各不相同。2. The two-dimensional code generation method according to claim 1, wherein the two-dimensional code includes eight peripheral positioning points, each of the peripheral positioning graphics includes three pixels, and eight of the surrounding positioning points The arrangement of the three pixels in the anchor point varies. 3.根据权利要求2所述的二维码生成方法,其特征在于,每条所述数据线上的数据图形均包括八个像素,所述数据图形包括四组主数据和四组备份数据,每组所述主数据对应一组所述备份数据,且所述主数据与所述备份数据的内容相同。3. The two-dimensional code generation method according to claim 2, wherein the data graphics on each of the data lines include eight pixels, and the data graphics include four groups of main data and four groups of backup data, Each set of the main data corresponds to a set of the backup data, and the contents of the main data and the backup data are the same. 4.一种二维码,其特征在于,所述二维码包括:4. A two-dimensional code, characterized in that the two-dimensional code comprises: 多个周边定位图形,多个所述周边定位图形分布在同一个圆的圆周上;A plurality of peripheral positioning figures, a plurality of said peripheral positioning figures are distributed on the circumference of the same circle; 中心定位图形,所述中心定位图形位于所述圆的圆心处,且所述中心定位图形限定夹角,所述夹角指向其中一个所述周边定位点;a central positioning figure, the central positioning figure is located at the center of the circle, and the central positioning figure defines an included angle, and the included angle points to one of the peripheral positioning points; 多个数据图形,多个所述数据图形分别分布在多条数据线上,每条所述数据线对应一个所述周边定位图形,且所述数据线连接该数据线对应的周边定位图形与所述中心定位图形。A plurality of data graphics, a plurality of the data graphics are respectively distributed on a plurality of data lines, each of the data lines corresponds to one of the peripheral positioning graphics, and the data lines are connected to the peripheral positioning graphics corresponding to the data line and the Describe the central positioning graphics. 5.根据权利要求4所述的二维码,其特征在于,所述二维码包括八个周边定位点,每个所述周边定位图形均包括三个像素,且八个所述周边定位点中三个像素的排列方式各不相同。5. The two-dimensional code according to claim 4, wherein the two-dimensional code includes eight peripheral positioning points, each of the peripheral positioning graphics includes three pixels, and the eight peripheral positioning points The three pixels in each are arranged differently. 6.根据权利要求5所述的二维码,其特征在于,每条所述数据线上的数据图形均包括八个像素,所述数据图形包括四组主数据和四组备份数据,每组所述主数据对应一组所述备份数据,且所述主数据与所述备份数据的内容相同。6. The two-dimensional code according to claim 5, wherein the data graphics on each of the data lines include eight pixels, and the data graphics include four sets of main data and four sets of backup data, each set The main data corresponds to a group of the backup data, and the content of the main data is the same as that of the backup data. 7.一种二维码生成装置,其特征在于,所述二维码生成装置包括:7. A two-dimensional code generating device, characterized in that, the two-dimensional code generating device comprises: 定位点确定模块,所述定位点确定模块用于确定多个定位点的位置,其中,多个所述定位点包括中心定位点和多个周边定位点,多个所述周边定位点均匀分布在同一个圆的圆周上,所述中心定位点位于所述圆的圆心处;An anchor point determination module, the anchor point determination module is used to determine the positions of a plurality of anchor points, wherein the plurality of anchor points include a central anchor point and a plurality of peripheral anchor points, and the plurality of peripheral anchor points are evenly distributed in On the circumference of the same circle, the central positioning point is located at the center of the circle; 定位图形设置模块,所述定位图形确定模块用于在所述中心定位点处设置中心定位图形,所述中心定位图形限定夹角,所述夹角指向其中一个所述周边定位点,并且所述定位图形设置模块还用于在所述周边定位点设置周边定位图形;A positioning figure setting module, the positioning figure determination module is used to set a central positioning figure at the central positioning point, the central positioning figure defines an included angle, and the included angle points to one of the surrounding positioning points, and the The positioning figure setting module is also used to set surrounding positioning figures at the surrounding positioning points; 数据线确定模块,所述数据线确定模块用于确定多条数据线的位置,每条所述数据线对应一个所述周边定位点,且所述数据线连接该数据线对应的周边定位点与所述中心定位点;A data line determination module, the data line determination module is used to determine the positions of multiple data lines, each of the data lines corresponds to one of the peripheral positioning points, and the data lines are connected to the peripheral positioning points corresponding to the data lines and said central anchor point; 数据图形设置模块,所述数据图形设置模块用于分别在各条所述数据线上设置图形数据图形,以获得所述二维码。A data graphic setting module, the data graphic setting module is used to respectively set graphic data graphics on each of the data lines to obtain the two-dimensional code. 8.根据权利要求1所述的二维码生成装置,其特征在于,所述二维码包括八个周边定位点,每个所述周边定位图形均包括三个像素,且八个所述周边定位点中三个像素的排列方式各不相同。8. The two-dimensional code generating device according to claim 1, wherein the two-dimensional code includes eight peripheral positioning points, each of the peripheral positioning graphics includes three pixels, and eight of the surrounding positioning points The arrangement of the three pixels in the anchor point varies. 9.根据权利要求2所述的二维码生成装置,其特征在于,每条所述数据线上的数据图形均包括八个像素,所述数据图形包括四组主数据和四组备份数据,每组所述主数据对应一组所述备份数据,且所述主数据与所述备份数据的内容相同。9. The two-dimensional code generating device according to claim 2, wherein each data pattern on the data line includes eight pixels, and the data pattern includes four groups of main data and four groups of backup data, Each group of the main data corresponds to a group of the backup data, and the contents of the main data and the backup data are the same.
CN201810580196.4A 2018-06-07 2018-06-07 Two-dimensional code generation method, two-dimensional code generation device and two-dimensional code Active CN108776828B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810580196.4A CN108776828B (en) 2018-06-07 2018-06-07 Two-dimensional code generation method, two-dimensional code generation device and two-dimensional code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810580196.4A CN108776828B (en) 2018-06-07 2018-06-07 Two-dimensional code generation method, two-dimensional code generation device and two-dimensional code

Publications (2)

Publication Number Publication Date
CN108776828A true CN108776828A (en) 2018-11-09
CN108776828B CN108776828B (en) 2021-04-13

Family

ID=64024715

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810580196.4A Active CN108776828B (en) 2018-06-07 2018-06-07 Two-dimensional code generation method, two-dimensional code generation device and two-dimensional code

Country Status (1)

Country Link
CN (1) CN108776828B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488753A (en) * 2019-01-29 2020-08-04 北京骑胜科技有限公司 Two-dimensional code identification method and device, electronic equipment and readable storage medium
CN112926715A (en) * 2021-03-23 2021-06-08 支付宝(杭州)信息技术有限公司 Two-dimensional code generating and decoding method, device and equipment
CN113222088A (en) * 2021-05-06 2021-08-06 顶象科技有限公司 Method and device for generating circular code

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010023896A1 (en) * 1998-10-22 2001-09-27 Duanfeng He Techniques for reading two dimensional code, including maxicode
CN101430768A (en) * 2007-11-07 2009-05-13 刘涛 Two-dimension bar code system and its positioning method
KR20090128751A (en) * 2008-06-11 2009-12-16 박문수 Rotary Autocord
CN102622626A (en) * 2011-12-26 2012-08-01 华南理工大学 Two-dimension code and method for recognizing same
CN103778400A (en) * 2012-10-25 2014-05-07 河南盛唐信息技术有限公司 Decoding method for automatically repairing and identifying code pattern symbols of two-dimensional codes and apparatus

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20010023896A1 (en) * 1998-10-22 2001-09-27 Duanfeng He Techniques for reading two dimensional code, including maxicode
CN101430768A (en) * 2007-11-07 2009-05-13 刘涛 Two-dimension bar code system and its positioning method
KR20090128751A (en) * 2008-06-11 2009-12-16 박문수 Rotary Autocord
CN102622626A (en) * 2011-12-26 2012-08-01 华南理工大学 Two-dimension code and method for recognizing same
CN103778400A (en) * 2012-10-25 2014-05-07 河南盛唐信息技术有限公司 Decoding method for automatically repairing and identifying code pattern symbols of two-dimensional codes and apparatus

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111488753A (en) * 2019-01-29 2020-08-04 北京骑胜科技有限公司 Two-dimensional code identification method and device, electronic equipment and readable storage medium
CN112926715A (en) * 2021-03-23 2021-06-08 支付宝(杭州)信息技术有限公司 Two-dimensional code generating and decoding method, device and equipment
CN112926715B (en) * 2021-03-23 2024-02-02 支付宝(中国)网络技术有限公司 Two-dimensional code generation and decoding method, device and equipment
CN113222088A (en) * 2021-05-06 2021-08-06 顶象科技有限公司 Method and device for generating circular code
CN113222088B (en) * 2021-05-06 2022-10-18 顶象科技有限公司 Method and device for generating circular code

Also Published As

Publication number Publication date
CN108776828B (en) 2021-04-13

Similar Documents

Publication Publication Date Title
US10410103B2 (en) Two-dimensional dot matrix barcode encoding and identifying methods
CN101398907B (en) Two-dimension code structure and decoding method for movable robot
JP3706385B2 (en) Information input / output method using dot pattern
TWI746882B (en) Two-dimensional barcode, printed publication, generating device, and information processing method
CN110288069B (en) Method, device and equipment for generating and analyzing two-dimensional code and readable storage medium
US8031375B2 (en) Information input/output method using dot pattern
US8442297B2 (en) Methods of evaluating the quality of two-dimensional matrix dot-peened marks on objects and mark verification systems
CN108776828A (en) Two-dimensional code generation method, Quick Response Code generating means and Quick Response Code
US8774524B2 (en) Image processing apparatus, image processing method, and storage medium of image processing method
TW200401229A (en) Method for reading a symbol having encoded information
CN112508145A (en) Electronic seal generation and verification method and device, electronic equipment and storage medium
JP6856956B2 (en) How to detect and recognize long-range high-density visual markers
US20180330211A1 (en) Billboard containing encoded information
CN111507120A (en) Two-dimensional code positioning frame identification method, device, electronic device and storage medium
CN111401365B (en) OCR image automatic generation method and device
CN117274366B (en) Line edge distance determining method and device
CN108388898A (en) Character identifying method based on connector and template
CN112529829B (en) Training method and device for burr positioning and burr detection model
CN110009080B (en) Two-dimensional code generation method, verification method, server and two-dimensional code
JPWO2014141412A1 (en) Image processing apparatus, image processing method, and image processing program
CN115033487A (en) Automatic testing method, device, computer equipment and storage medium based on image recognition
CN113095104A (en) Defective two-dimensional code positioning method
CN110837747A (en) Two-dimensional code authentication method, device, equipment and storage medium
KR102161453B1 (en) High resolution pattern scanning method and the apparatus thereof
JP7478628B2 (en) Image processing device, control method, and control program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant