CN111523630A - Two-dimensional code, two-dimensional code encoding method and device, and two-dimensional code identification method and device - Google Patents

Two-dimensional code, two-dimensional code encoding method and device, and two-dimensional code identification method and device Download PDF

Info

Publication number
CN111523630A
CN111523630A CN202010315268.XA CN202010315268A CN111523630A CN 111523630 A CN111523630 A CN 111523630A CN 202010315268 A CN202010315268 A CN 202010315268A CN 111523630 A CN111523630 A CN 111523630A
Authority
CN
China
Prior art keywords
dimensional code
user
data
area
subdata
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
CN202010315268.XA
Other languages
Chinese (zh)
Other versions
CN111523630B (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 Banknote Printing Technology Research Institute Co ltd
China Banknote Printing and Minting Corp
Original Assignee
China Banknote Printing and Minting Corp
Institute of Printing Science and Technology Peoples Bank of China
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 Banknote Printing and Minting Corp, Institute of Printing Science and Technology Peoples Bank of China filed Critical China Banknote Printing and Minting Corp
Priority to CN202010315268.XA priority Critical patent/CN111523630B/en
Publication of CN111523630A publication Critical patent/CN111523630A/en
Application granted granted Critical
Publication of CN111523630B publication Critical patent/CN111523630B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/06037Record 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 multi-dimensional coding
    • 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

Abstract

The application provides a two-dimension code, a two-dimension code encoding method and device, and an identification method and device. The two-dimensional code comprises a graph outline area and a graph filling area; the graphic outline region is used for presenting the appearance style of the two-dimensional code; the figure filling area is positioned in the figure outline area and is formed by repeatedly filling the primitive two-dimensional codes; each element two-dimensional code consists of code elements and comprises a positioning area and a data area, wherein the positioning area is used for a reading program to determine the position of each area in the element two-dimensional code, and the data area is used for storing user data. The two-dimensional code provided by the application can break through the limitation of the traditional two-dimensional code on the appearance shape, and the two-dimensional code data is hidden in any graphic shape.

Description

Two-dimensional code, two-dimensional code encoding method and device, and two-dimensional code identification method and device
Technical Field
The application relates to the field of two-dimensional codes, in particular to a two-dimensional code, a two-dimensional code encoding method and device, and a two-dimensional code identification method and device.
Background
In recent years, with the continuous development of a graphic coding technology and an image processing technology, a two-dimensional code technology develops rapidly and is widely applied to the fields of mobile payment, securities, information traceability, product packaging, internet of things and the like. Over decades of development, many different kinds of two-dimensional codes, such as QR Code (Quick Response Code), PDF147, DataMatrix, Tencent applet, etc., are emerging.
The traditional one-dimensional bar code and two-dimensional code usually have fixed and unchangeable shapes, the appearance shapes of the traditional one-dimensional bar code and the traditional two-dimensional bar code are usually limited to be fixed shapes such as a rectangle or a circle, the appearance is quite single, and the diversity is lacked. In order to facilitate program reading, the traditional one-dimensional bar code and the traditional two-dimensional bar code usually exist independently in product design, are difficult to be fused with other image-text designs on the product, and destroy the integral image-text design style of the product to a certain extent. Moreover, in order to enable a reading program to quickly and accurately locate, the locating pattern in the conventional matrix two-dimensional code is usually large in size, which reduces the effective user data stored in the two-dimensional code coding area. If more data needs to be stored, the size and range of the two-dimensional code have to be enlarged. In order to beautify the appearance style of the two-dimensional code, many manufacturers beautify code elements, positioning blocks and the like by using the fault-tolerant capability of the two-dimensional code, but the success rate of reading the two-dimensional code is reduced by the method, and the two-dimensional code can only restore the stored effective user data by a corresponding error correction algorithm by storing more error correction codes. The method sacrifices the capacity of the two-dimension code for storing effective user data, increases the complexity of a decoding and identifying algorithm and reduces the efficiency of two-dimension code identification.
Disclosure of Invention
The application aims to provide a two-dimension code, a two-dimension code encoding method and device, and a two-dimension code identification method and device. The two-dimensional code can break through the limitation of the traditional two-dimensional code on the appearance shape by storing the user data in the primitive two-dimensional code and repeatedly filling the primitive two-dimensional code into the two-dimensional code pattern filling area, and provides richer, more flexible and more changeable appearance patterns. The two-dimension code can be fused with the product graphic design, so that the two-dimension code is hidden in the product graphic design. Due to the repeated filling mechanism, the obtained two-dimensional code has good data redundancy characteristic, and the fault-tolerant performance and the reading success rate of the two-dimensional code can be further improved.
In a first aspect of the present application, a two-dimensional code is provided, which includes a graph outline area and a graph filling area;
the graphic outline region is used for presenting the appearance style of the two-dimensional code;
the figure filling area is positioned in the figure outline area and is formed by repeatedly filling the primitive two-dimensional codes;
each element two-dimensional code consists of code elements and comprises a positioning area and a data area, wherein the positioning area is used for a reading program to determine the position of each area in the element two-dimensional code, and the data area is used for storing user data.
In a second aspect of the present application, a two-dimensional code encoding method is provided, including:
receiving graphic setting data and user data input by a user;
generating a graph outline area and a blank graph filling area according to the graph setting data;
acquiring a primitive two-dimensional code model, wherein the primitive two-dimensional code model consists of code elements and comprises a positioning area and a data area, and the positioning area is used for a reading program to determine the position of each area in the primitive two-dimensional code;
filling user data into a data area according to a first preset encoding and decoding rule to obtain a primitive two-dimensional code;
and repeatedly filling the primitive two-dimensional code into a pattern filling area to obtain a two-dimensional code pattern.
Further, before or after acquiring the primitive two-dimensional code model, the method further comprises:
segmenting user data to obtain user subdata and sequence information of the user subdata;
filling the user data into the data area according to a first predetermined encoding and decoding rule further comprises: and for each user subdata, filling the user subdata and the sequence information thereof into a data area according to a first preset coding and decoding rule to obtain a primitive two-dimensional code.
Further, when receiving graphic setting data and user data input by a user, receiving coding function data or determining the coding function data according to the user data;
the primitive two-dimensional code model also comprises a functional area;
filling the user data into the data area according to a first preset encoding and decoding rule to obtain the elementary two-dimensional code, further comprising:
and filling the coding function data into the function area according to a second coding and decoding rule, and filling the user data into the data area according to a coding and decoding rule corresponding to the coding function data to obtain the primitive two-dimensional code.
Further, before or after acquiring the primitive two-dimensional code model, the method further comprises:
segmenting user data to obtain user subdata and sequence information of the user subdata;
filling the coding function data into the function area according to the second coding and decoding rule, filling the user data into the data area according to the coding and decoding rule corresponding to the coding function data, and obtaining the element two-dimensional code further comprises the following steps: and for each piece of user subdata, filling the coded function data and the sequence information of the user subdata into a function area according to a second preset coding and decoding rule, and filling the user subdata into a data area according to a coding and decoding rule corresponding to the coded function data to obtain the elementary two-dimensional code.
In a third aspect of the present application, there is provided a two-dimensional code encoding device, including:
the input module is used for receiving graphic setting data and user data input by a user;
the generating module is used for generating a graph outline area and a blank graph filling area according to the graph setting data;
the encoding module is used for acquiring a primitive two-dimensional code model, the primitive two-dimensional code model consists of code elements and comprises a positioning area and a data area, and the positioning area is used for a reading program to determine the position of each area in the primitive two-dimensional code;
the first filling module is used for filling the user data into the data area according to a first preset coding and decoding rule to obtain a primitive two-dimensional code;
and the second filling module is used for repeatedly filling the primitive two-dimensional code into the pattern filling area to obtain the two-dimensional code pattern.
In a fourth aspect of the present application, a two-dimensional code identification method is further provided, including:
collecting a two-dimensional code image;
searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area in an elementary two-dimensional code according to one or more searched positioning areas;
and decoding each code element in the data region according to a first preset coding and decoding rule to obtain user data.
In a fifth aspect of the present application, a two-dimensional code identification method is further provided, including:
collecting a two-dimensional code image;
searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area in an elementary two-dimensional code according to one or more searched positioning areas;
decoding each code element in the data area according to a first preset coding and decoding rule to obtain the user subdata and the sequence information of the user subdata;
determining the number of the elementary two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and re-executing the steps of positioning and decoding according to the number of the elementary two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and combining the user subdata according to the sequence information of the user subdata to obtain the user data.
In a sixth aspect of the present application, there is provided a two-dimensional code identification method, including:
collecting a two-dimensional code image;
searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area and a functional area in an elementary two-dimensional code according to one or more searched positioning areas;
decoding each code element in the functional region according to a second preset coding and decoding rule to obtain coding functional data;
and decoding each code element in the data area according to the coding and decoding rules corresponding to the coding function data to obtain the user data.
A seventh aspect of the present application further provides a two-dimensional code identification method, including:
collecting a two-dimensional code image;
searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area and a functional area in an elementary two-dimensional code according to one or more searched positioning areas;
decoding each code element in the functional area according to a second preset coding and decoding rule to obtain the sequence information of the coding functional data and the user subdata;
decoding each code element in the data area according to a coding and decoding rule corresponding to the coding function data to obtain user subdata;
determining the number of the elementary two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and re-executing the steps of positioning and decoding according to the number of the elementary two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and combining the user subdata according to the sequence information of the user subdata to obtain the user data.
In an eighth aspect of the present application, there is provided a two-dimensional code recognition apparatus, including:
the acquisition module is used for acquiring a two-dimensional code image;
the positioning module is used for searching a positioning area in the two-dimensional code image and positioning the range and the direction of a data area in the elementary two-dimensional code according to one or more searched positioning areas;
and the identification module is used for decoding each code element in the data area according to a first preset coding and decoding rule to obtain user data.
The ninth aspect of the present application further provides a two-dimensional code recognition apparatus, including:
the acquisition module is used for acquiring a two-dimensional code image;
the positioning module is used for searching a positioning area in the two-dimensional code image and positioning the range and the direction of a data area in a primitive two-dimensional code according to one or more searched positioning areas;
the identification module is used for decoding each code element in the data area according to a first preset coding and decoding rule to obtain the user subdata and the sequence information of the user subdata;
the analysis module is used for determining the number of the elementary two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and restarting the positioning module and the identification module according to the number of the elementary two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and the combination module is used for combining the user subdata according to the sequence information of the user subdata to obtain the user data.
In a tenth aspect of the present application, there is provided a two-dimensional code recognition apparatus, including:
the acquisition module is used for acquiring a two-dimensional code image;
the positioning module is used for searching a positioning area in the two-dimensional code image and positioning the range and the direction of a data area and a functional area in a primitive two-dimensional code according to one or more searched positioning areas;
the first identification module is used for decoding each code element in the functional region according to a second preset coding and decoding rule to obtain coding functional data;
and the second identification module is used for decoding each code element in the data area according to the coding and decoding rule corresponding to the coding function data to obtain the user data.
In an eleventh aspect of the present application, there is provided a two-dimensional code recognition apparatus, including:
the acquisition module is used for acquiring a two-dimensional code image;
the positioning module is used for searching a positioning area in the two-dimensional code image and positioning the range and the direction of a data area and a functional area in a primitive two-dimensional code according to one or more searched positioning areas;
the first identification module is used for decoding each code element in the functional area according to a second preset coding and decoding rule to obtain the sequence information of the coding functional data and the user subdata;
the second identification module is used for decoding each code element in the data area according to the coding and decoding rules corresponding to the coding function data to obtain the user subdata;
the analysis module is used for determining the number of the elementary two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and restarting the positioning module, the first identification module and the second identification module according to the number of the elementary two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and the combination module is used for combining the user subdata according to the sequence information of the user subdata to obtain the user data.
In a twelfth aspect of the present application, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the two-dimensional code encoding method according to any of the foregoing embodiments.
In a thirteenth aspect of the present application, a computer-readable storage medium stores a computer program for implementing the two-dimensional code encoding method according to any one of the foregoing embodiments when the computer program is executed by a processor.
In a fourteenth aspect of the present application, a computer device is provided, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and when the processor executes the computer program, the processor implements the two-dimensional code recognition method according to any of the foregoing embodiments.
In a fifteenth aspect of the present application, a computer-readable storage medium is provided, which stores a computer program for executing, when executed by a processor, a two-dimensional code identification method according to any one of the foregoing embodiments.
The two-dimensional code that this application provided can break through traditional two-dimensional code to the restriction of appearance shape, realizes the variety of two-dimensional code outward appearance and size. The appearance style of the two-dimensional code can be changed according to user requirements, the two-dimensional code is hidden in product graphic design, and information data storage and hiding are achieved while the product design diversity requirements are considered. In addition, the two-dimensional code comprises a plurality of primitive two-dimensional codes, the stored information has redundancy, the stored information can be successfully extracted by a reading program only by finding one or more primitive two-dimensional codes, and even if part of the primitive two-dimensional codes in the two-dimensional code are damaged, the two-dimensional code can still be decoded by other undamaged primitive two-dimensional codes, so that the two-dimensional code has better fault tolerance and adaptability.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic view of a two-dimensional code with a digital outline according to an embodiment of the present disclosure;
fig. 2 is a schematic view of a two-dimensional code of a butterfly profile according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a primitive two-dimensional code according to an embodiment of the present disclosure;
fig. 4A, fig. 4B, fig. 5A and fig. 5B are flowcharts of a two-dimensional code encoding method according to an embodiment of the present application;
fig. 6A and fig. 6B are schematic diagrams of a two-dimensional code obtained after encoding according to an embodiment of the present application;
fig. 7A and 7B are configuration diagrams of a two-dimensional code encoding device according to an embodiment of the present application;
fig. 8A, 8B, 9A, and 9B are flowcharts of a two-dimensional code recognition method according to an embodiment of the present application;
fig. 10A, 10B, 11A, and 11B are schematic diagrams of a two-dimensional code recognition apparatus according to an embodiment of the present disclosure;
fig. 12 is a schematic diagram of a primitive two-dimensional code positioning method according to an embodiment of the present application;
fig. 13 is a schematic diagram of a computer device according to an embodiment of the present application.
Detailed Description
In order to make the technical features and effects of the present application more obvious, the technical solutions of the present application are further described below with reference to the accompanying drawings, and the present application may also be described or implemented by other different specific examples, and any equivalent changes made by those skilled in the art within the scope of the claims are included in the protection scope of the present application.
In the description herein, references to the description of the terms "an embodiment," "a particular embodiment," "some embodiments," "for example," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. The sequence of steps involved in the embodiments is for illustrative purposes to illustrate the implementation of the present application, and the sequence of steps is not limited and can be adjusted as needed.
The terms "first," "second," and the like, as used in the description of the present specification, do not particularly denote any order or sequence, nor are they used to limit the present application, but rather are used to distinguish one element or operation from another element or operation described in the same technical language.
It should be noted that, in the following embodiments, if no special description is made, the two-dimensional code refers to a two-dimensional code provided in the present application.
The two-dimensional code proposed in the present application is composed of a pattern outline area 101, 201 and a pattern fill area 102, 202. The figure outline area is used for presenting the appearance style of the two-dimensional code. The figure filling area is positioned in the figure outline area and is formed by repeatedly filling the primitive two-dimensional codes. Each element two-dimensional code consists of code elements and comprises a positioning area and a data area, wherein the positioning area is used for a reading program to determine the position of each area in the element two-dimensional code so as to facilitate the decoding of the reading program, and the data area is used for storing user data.
In specific implementation, the shape of the graphic outline region may be arbitrarily selected, which is not limited in this application, for example, the graphic outline region 101 in fig. 1 is a digital shape, and the graphic outline region 201 in fig. 2 is a butterfly shape. In addition, the figure outline region can be an outline figure with obvious boundary, can also be an outline figure without obvious boundary, and can also be an outline figure with certain filling space inside.
The primitive two-dimensional codes can be filled in an orderly or unordered mode, the specific filling mode is not limited in the application, and the graphic filling area can be filled as long as the primitive two-dimensional codes are not overlapped with each other. In some embodiments, in order to increase the data storage density, the adjacent arrangement mode of the two-dimensional codes can be selected. The primitive two-dimensional code repeatedly filling the graphic filling area is a single primitive two-dimensional code storing the same user data or a plurality of primitive two-dimensional codes storing different user data. The type of the code element in the primitive two-dimensional code can be selected at will, and the application does not specifically limit the type of the code element. As shown in fig. 3, the symbol 301 of the elementary two-dimensional code 300 is composed of hexagonal cells.
In an embodiment of the present application, as shown in fig. 3, the primitive two-dimensional code includes a functional area 304 for storing encoding functional data, in addition to a positioning area 302 and a data area 303. Specifically, the encoding function data includes, but is not limited to, version information, mask information, and error correction level information.
The version information is used for limiting the maximum storage capacity of the two-dimensional code, the division form of the code element, the filling mode of the primitive two-dimensional code and the like. The different version information corresponds to different coding and decoding rules or data capacity of the two-dimensional code. And when the two-dimensional code is coded, storing the user data in the code element of the data area according to the coding and decoding rule corresponding to the version information. And when the two-dimensional code is decoded, decoding the code element of the data area according to the coding and decoding rule corresponding to the version information.
The mask information is used to indicate a mask pattern used by the two-dimensional code. And masking (masking) the filled or pre-filled two-dimensional code graph by using a preset masking pattern (masking), so that the color distribution of the finally presented two-dimensional code graph is more uniform. Specifically, masking enables the dark and light (e.g., black and white, black representing a binary 1 and white representing a binary 0) regions in the two-dimensional code pattern to be distributed at an optimal ratio.
The error correction levels may follow, for example, 4 error correction levels (L, M, Q, H) of the conventional two-dimensional code, and new error correction levels may also be defined. In specific implementation, error correction data is calculated by an error correction algorithm (a reed solomon error correction algorithm (reed solomon error correction) algorithm can be selected, and other algorithms can also be selected) according to the error correction level and the user data, and the user data and the error correction data are stored in a data area of the two-dimensional code according to a preset rule, so that the user data can still be restored by a reading program under the conditions of partial pollution, incomplete defect and the like of the two-dimensional code.
In an embodiment of the present application, as shown in fig. 3, the positioning area 302 is composed of a positioning pattern 305 and an auxiliary positioning pattern 306, it should be noted that the positioning pattern and the auxiliary positioning pattern shown in fig. 3 are only examples, and the present application does not specifically limit the selection of the positioning pattern and the auxiliary positioning pattern. The positioning graph is used for searching and determining the position of the primitive two-dimensional code, and the collected two-dimensional code graph is corrected by utilizing the characteristics of the positioning graph. The auxiliary positioning graph is optional and is mainly used for correcting image mirroring, overturning and the like.
In an embodiment of the present application, there is further provided a two-dimensional code encoding method according to any one of the above embodiments, as shown in fig. 4A, including:
step 401, receiving the graphic setting data and the user data input by the user. In specific implementation, the graphic setting data may be selected by a user according to a preset graphic list, or may be set by the user according to a requirement, which is not limited in the present application.
In step 403, a pattern outline area and a blank pattern fill area are generated based on the pattern setting data.
Step 405, obtaining a primitive two-dimensional code model, where the primitive two-dimensional code model is composed of code elements and includes a positioning area and a data area, and the positioning area is used for the recognition program to determine the position of each area in the primitive two-dimensional code. The primitive two-dimensional code model is a primitive two-dimensional code not filled with user data.
Step 407, the user data is filled into the data area according to a first predetermined encoding and decoding rule, so as to obtain the primitive two-dimensional code.
And 409, repeatedly filling the primitive two-dimensional code into a pattern filling area to obtain a two-dimensional code pattern.
As an example of the application, the two-dimensional code obtained by the encoding method is shown in fig. 6A and 6B, the appearance style of the obtained two-dimensional code can be changed according to the user requirement, and the two-dimensional code is hidden in the product graphic design, so that the information data can be stored and hidden while the product design diversity requirement is considered. In addition, the two-dimensional code comprises a plurality of primitive two-dimensional codes, the stored information has redundancy, the stored information can be successfully extracted by a reading program only by finding one or more primitive two-dimensional codes, and even if part of the primitive two-dimensional codes in the two-dimensional code are damaged, the two-dimensional code can still be decoded by other undamaged primitive two-dimensional codes, so that the two-dimensional code has better fault tolerance and adaptability.
In specific implementation, if the user data is large, one primitive two-dimensional code cannot store all the user data, as shown in fig. 4B, before or after the step 405 of obtaining the primitive two-dimensional code model, the method further includes: step 406, segmenting the user data to obtain the user sub-data and the sequence information of the user sub-data, where the sequence information of the user sub-data is used to accurately restore the user data when the two-dimensional code is decoded, and specifically, the sequence information of the user sub-data includes: the ordering of the user subdata and the total number of the user subdata.
The step 407 further includes: step 407', for each user subdata, the user subdata and the sequence information thereof are filled into the data area according to a first predetermined encoding and decoding rule to obtain a primitive two-dimensional code. In the above step 409, all the primitive two-dimensional codes obtained in the step 407' are repeatedly filled into the pattern filling area to obtain a two-dimensional code pattern.
In an embodiment of the present application, as shown in fig. 5A, a two-dimensional code encoding method includes:
step 501, receiving the graphic setting data, the encoding function data and the user data input by the user. In particular, the encoding function data (including but not limited to version information, mask information, and error correction level information) may also be determined according to the user data, for example, the version information may be determined according to the size of the user data.
In step 503, a pattern outline area and a blank pattern fill area are generated based on the pattern setting data.
And 505, acquiring a primitive two-dimensional code model, wherein the primitive two-dimensional code model consists of code elements and comprises a positioning area, a data area and a functional area, and the positioning area is used for a reading program to determine the position of each area in the primitive two-dimensional code.
And 507, filling the coding function data into the function area according to a second coding and decoding rule, and filling the user data into the data area according to a coding and decoding rule corresponding to the coding function data to obtain the primitive two-dimensional code.
In one embodiment, the encoding function data includes version information, mask information, and error correction level information, and the process of filling the user data into the data region according to the encoding and decoding rules corresponding to the encoding function data includes: coding the user data according to the coding and decoding rules corresponding to the version information to obtain binary data; and processing the binary data according to the error correction level and the mask information, and filling the processed data into the data area.
And 509, repeatedly filling the primitive two-dimensional code into a pattern filling area to obtain a two-dimensional code pattern.
In specific implementation, if the user data is large, one primitive two-dimensional code cannot store all the user data, as shown in fig. 5B, before or after the step 505 of obtaining the primitive two-dimensional code model, the method further includes: step 506, the user data is segmented to obtain the user sub data and the sequence information of the user sub data.
In step 507, the encoding function data is filled into the function area according to the second encoding and decoding rule, and the user data is filled into the data area according to the encoding and decoding rule corresponding to the encoding function data, so as to obtain the primitive two-dimensional code, further including: and 507', for each piece of user subdata, filling the coded function data and the sequence information of the user subdata into a function area according to a second preset coding and decoding rule, and filling the user subdata into a data area according to a coding and decoding rule corresponding to the coded function data to obtain the elementary two-dimensional code.
Based on the same inventive concept, an embodiment of the present application further provides a coding apparatus, as shown in fig. 7A, which is suitable for the two-dimensional code described in the embodiment of fig. 4A, and since the principle of solving the problem of the coding apparatus is similar to that of the coding method, the implementation of the coding apparatus may refer to the coding method, and repeated details are omitted. Specifically, the encoding device includes:
an input module 701, configured to receive graphic setting data and user data input by a user;
a generating module 702, configured to generate a graph outline area and a blank graph filling area according to graph setting data;
the encoding module 703 is configured to obtain a primitive two-dimensional code model, where the primitive two-dimensional code model is composed of code elements and includes a positioning area and a data area, and the positioning area is used for a recognition program to determine the position of each area in the primitive two-dimensional code;
a first filling module 704, configured to fill the user data into the data area according to a first predetermined encoding and decoding rule, so as to obtain a primitive two-dimensional code;
the second filling module 705 is configured to repeatedly fill the primitive two-dimensional code into the pattern filling area to obtain a two-dimensional code pattern.
In a further embodiment, the input module 701 is further configured to receive encoded function data input by a user or determine the encoded function data according to the user data, the primitive two-dimensional code model obtained by the encoding module 703 further includes a function region, the first filling module 704 is configured to fill the encoded function data into the function region according to a second encoding and decoding rule, and fill the user data into the data region according to an encoding and decoding rule corresponding to the encoded function data, so as to obtain the primitive two-dimensional code.
In an embodiment of the present application, an encoding apparatus is further provided, as shown in fig. 7B, which is suitable for the two-dimensional code described in the embodiment of fig. 4B, and includes:
an input module 701' for receiving graphic setting data and user data input by a user;
a generating module 702' for generating a graph outline area and a blank graph filling area according to the graph setting data;
the encoding module 703' is used for obtaining a primitive two-dimensional code model, wherein the primitive two-dimensional code model is composed of code elements and comprises a positioning area and a data area, and the positioning area is used for a reading program to determine the position of each area in the primitive two-dimensional code;
the segmentation module 706' is configured to segment the user data to obtain the user sub data and sequence information of the user sub data;
a first filling module 704' for filling the user subdata and the sequence information thereof into a data area according to a first predetermined encoding and decoding rule for each user subdata to obtain a primitive two-dimensional code;
the second filling module 705' is configured to repeatedly fill the primitive two-dimensional code into the graph filling area, so as to obtain a two-dimensional code graph.
In a further embodiment, the input module 701 ' is further configured to receive encoded function data input by a user or determine the encoded function data according to the user data, the primitive two-dimensional code model obtained by the encoding module 703 ' further includes a function area, and the first filling module 704 ' is configured to, for each piece of user data, fill the encoded function data and sequence information of the user data into the function area according to a second predetermined encoding and decoding rule, and fill the user data into the data area according to the encoding and decoding rule corresponding to the encoded function data, so as to obtain the primitive two-dimensional code.
In an embodiment of the present application, a two-dimensional code identification method is further provided, as shown in fig. 8A, where the two-dimensional code obtained by the encoding method shown in fig. 4A includes:
step 801, collecting a two-dimensional code image;
step 802, searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area in a primitive two-dimensional code according to one or more searched positioning areas;
step 803, decode each symbol in the data region according to a first predetermined coding and decoding rule to obtain user data.
The acquired two-dimensional code image can be a whole two-dimensional code image or a part of two-dimensional code image, and the primitive two-dimensional codes are repeatedly filled, so that the user data can be accurately restored even under the condition of acquiring a part of two-dimensional code image.
In specific implementation, the range and the direction of a data area in the primitive two-dimensional code can be positioned through the positioning area of the single primitive two-dimensional code. Or according to the positioning areas of a plurality of primitive two-dimensional codes, positioning the range and the orientation of the data area in the primitive two-dimensional codes, as shown in fig. 12, the reading program searches a group of adjacent 4 positioning area graphs, and the range and the orientation of one primitive two-dimensional code can be determined through the 4 positioning point graphs.
In an embodiment of the present application, a two-dimensional code identification method is further provided, as shown in fig. 8B, where the two-dimensional code obtained by the encoding method shown in fig. 4B includes:
step 801', collecting a two-dimensional code image;
step 802', searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area in a primitive two-dimensional code according to one or more searched positioning areas;
step 803', according to the first predetermined encoding and decoding rule, decoding each code element in the data area to obtain the user subdata and the sequence information of the user subdata;
step 804 ', determining the number of the elementary two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and re-executing the step 802 ' and the step 803 ' according to the number of the elementary two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and step 805', combining the user subdata according to the sequence information of the user subdata to obtain user data.
In specific implementation, if the total number of the user sub-data includes N user sub-data, the user sub-data and the sequence information of the user sub-data obtained after decoding in step 803' are: (user subdata 1, order 1/N). From the sequence information 1/N, it can be known that N pieces of user sub-data are included, and at this time, step 802' and the following steps should be executed again until all user sub-data and the sequence information thereof are obtained. And if the user data cannot be obtained, prompting the user to acquire the two-dimensional code image again.
In an embodiment of the present application, a two-dimensional code identification method is further provided, as shown in fig. 9A, where the two-dimensional code obtained by the encoding method shown in fig. 5A includes:
step 901, collecting a two-dimensional code image;
step 902, searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area and a functional area in a primitive two-dimensional code according to one or more searched positioning areas;
step 903, decoding each code element in the function region according to a second preset coding and decoding rule to obtain coding function data;
step 904, decoding each code element in the data region according to the coding and decoding rules corresponding to the coding function data to obtain the user data.
In one embodiment, the process of obtaining the user data by decoding each symbol in the data region according to the coding and decoding rule corresponding to the coding function data includes: decoding the user data according to the coding and decoding rules corresponding to the version information to obtain binary data; and processing the binary data according to the error correction grade and the mask information to obtain user data.
In an embodiment of the present application, a two-dimensional code identification method is further provided, as shown in fig. 9B, where the two-dimensional code obtained by the encoding method shown in fig. 5B includes:
step 901', collecting a two-dimensional code image;
step 902', searching a positioning area in a two-dimensional code image, and positioning the range and the direction of a data area and a functional area in a primitive two-dimensional code according to one or more searched positioning areas;
903', according to the second preset encoding and decoding rule, decoding each code element in the function region to obtain the sequence information of the encoding function data and the user subdata;
step 904', decoding each code element in the data area according to the coding and decoding rules corresponding to the coding function data to obtain the user subdata;
step 905 ', determining the number of the primitive two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and re-executing the step 902' and the following steps according to the number of the primitive two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and 906', combining the user subdata according to the sequence information of the user subdata to obtain the user data.
In specific implementation, after searching for the positioning area in the two-dimensional code image, the method further includes: and carrying out graph correction and transformation on the two-dimensional code graph by using the positioning area in the two-dimensional code image.
Based on the same inventive concept, the present application further provides a two-dimensional code recognition apparatus corresponding to the above-mentioned fig. 8A, 8B, 9A and 9B, as shown in fig. 10A, 10B, 11A and 11B, since the principle of the recognition apparatus to solve the problem is similar to the above-mentioned encoding method, the implementation of the apparatus can refer to the above-mentioned encoding method, and the repeated details are not repeated.
Specifically, in an embodiment of the present application, as shown in fig. 10A, the two-dimensional code recognition apparatus includes:
the acquisition module 1001 is used for acquiring a two-dimensional code image;
the positioning module 1002 is configured to search for a positioning area in the two-dimensional code image, and position a range and an orientation of a data area in a primitive two-dimensional code according to one or more searched positioning areas;
the identifying module 1003 is configured to decode each symbol in the data region according to a first predetermined encoding and decoding rule, so as to obtain user data.
In an embodiment of the present application, as shown in fig. 10B, the two-dimensional code recognition apparatus includes:
the acquisition module 1001' is used for acquiring a two-dimensional code image;
the positioning module 1002' is used for searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area in a primitive two-dimensional code according to one or more searched positioning areas;
an identifying module 1003' for decoding each code element in the data area according to a first predetermined encoding and decoding rule to obtain the user sub-data and the sequence information of the user sub-data;
the analyzing module 1004 ' is used for determining the number of the primitive two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and restarting the positioning module 1002 ' and the identifying module 1003 ' according to the number of the primitive two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and the combination module 1005' is used for combining the user subdata according to the sequence information of the user subdata to obtain the user data.
In an embodiment of the present application, as shown in fig. 11A, the two-dimensional code recognition apparatus includes:
the acquisition module 1101 is used for acquiring a two-dimensional code image;
the positioning module 1102 is configured to search a positioning area in the two-dimensional code image, and position a range and an orientation of a data area and a functional area in a primitive two-dimensional code according to one or more searched positioning areas;
a first identifying module 1103, configured to decode each symbol in the functional region according to a second predetermined encoding and decoding rule to obtain encoded functional data;
and a second identifying module 1104, configured to decode each symbol in the data region according to a coding/decoding rule corresponding to the coding function data to obtain user data.
In an embodiment of the present application, as shown in fig. 11B, the two-dimensional code recognition apparatus includes:
the acquisition module 1101' is used for acquiring a two-dimensional code image;
the positioning module 1102' is used for searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area and a functional area in the elementary two-dimensional code according to one or more searched positioning areas;
a first identifying module 1103' for decoding each code element in the functional region according to a second predetermined encoding and decoding rule to obtain the sequence information of the encoded functional data and the user sub-data;
the second identification module 1104' is used for decoding each code element in the data area according to the coding and decoding rule corresponding to the coding function data to obtain the user subdata;
the analyzing module 1105 'is configured to determine the number of primitive two-dimensional codes storing different pieces of user sub-data according to the sequence information of the user sub-data, and restart the positioning module 1102', the first identifying module 1103 'and the second identifying module 1104' according to the number of primitive two-dimensional codes storing different pieces of user sub-data until all pieces of user sub-data and sequence information thereof are obtained;
the combining module 1106' is configured to combine the user sub-data according to the sequence information of the user sub-data to obtain user data.
The two-dimensional code provided by the application can break through the limitation of the traditional two-dimensional code on the appearance shape by storing the user data in the primitive two-dimensional code and repeatedly filling the primitive two-dimensional code to the two-dimensional code pattern filling area, and provides more abundant, flexible and changeable appearance patterns. The two-dimension code can be fused with the product graphic design, so that the two-dimension code is hidden in the product graphic design. Due to the repeated filling mechanism, the obtained two-dimensional code has good data redundancy characteristic, and the fault-tolerant performance and the reading success rate of the two-dimensional code can be further improved.
As shown in fig. 13, which is a schematic structural diagram of a computer device according to an embodiment of the present application, in particular, the computer device 1302 may include one or more processors 1304, such as one or more Central Processing Units (CPUs), and each processing unit may implement one or more hardware threads. The computer device 1302 may further include any memory 1306, configured to store a computer program, where when the processor executes the computer program, the two-dimensional code encoding method according to any one of the foregoing embodiments or the two-dimensional code identification method according to any one of the foregoing embodiments is implemented, and when the two-dimensional code encoding method and the two-dimensional code identification method are implemented, different computer devices may implement the two-dimensional code encoding method and the two-dimensional code identification method. For example, without limitation, memory 1306 may include any one or more of the following in combination: any type of RAM, any type of ROM, flash memory devices, hard disks, optical disks, etc. More generally, any memory may use any technology to store information. Further, any memory may provide volatile or non-volatile retention of information. Further, any memory may represent fixed or removable components of computer device 1302. In one case, when processor 1304 executes associated instructions that are stored in any memory or combination of memories, computer device 1302 may perform any of the operations of the associated instructions. The computer device 1302 also includes one or more drive mechanisms 1308, such as a hard disk drive mechanism, an optical drive mechanism, etc., for interacting with any memory.
Computer device 1302 may also include an input/output module 1310(I/O) for receiving various inputs (via input device 1312) and for providing various outputs (via output device 1314)). One particular output mechanism may include a presentation device 1316 and an associated Graphical User Interface (GUI) 1318. In other embodiments, input/output module 1310(I/O), input device 1312, and output device 1314 may also not be included, as only one computer device in a network. Computer device 1302 may also include one or more network interfaces 1320 for exchanging data with other devices via one or more communication links 1322. One or more communication buses 1324 couple the above-described components together.
Communication link 1322 may be implemented in any manner, e.g., via a local area network, a wide area network (e.g., the Internet), a point-to-point connection, etc., or any combination thereof. The communication link 1322 may comprise any combination of hardwired links, wireless links, routers, gateway functions, name servers, etc., governed by any protocol or combination of protocols.
In an embodiment of the present application, a computer readable instruction is further provided, where when the processor executes the instruction, the program causes the processor to execute the two-dimensional code encoding method shown in one of fig. 4A, fig. 4B, fig. 5A, and fig. 5B.
In an embodiment of the present application, a computer readable instruction is further provided, wherein when the processor executes the instruction, the program causes the processor to execute the two-dimensional code recognition method shown in one of fig. 8A, fig. 8B, fig. 9A, and fig. 9B.
As will be appreciated by one skilled in the art, method embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The above description is only for the purpose of illustrating the present disclosure, and any person skilled in the art can modify and change the above embodiments without departing from the spirit and scope of the present disclosure. Therefore, the protection scope of the claims of the present application shall be subject to the claims.

Claims (22)

1. A two-dimensional code is characterized by comprising a graph outline area and a graph filling area;
the graphic outline region is used for presenting the appearance style of the two-dimensional code;
the figure filling area is positioned in the figure outline area and is formed by repeatedly filling the primitive two-dimensional codes;
each element two-dimensional code consists of code elements and comprises a positioning area and a data area, wherein the positioning area is used for a reading program to determine the position of each area in the element two-dimensional code, and the data area is used for storing user data.
2. The two-dimensional code according to claim 1, wherein the primitive two-dimensional code repeatedly filling the graphic filling area is a single primitive two-dimensional code storing the same user data or a plurality of primitive two-dimensional codes storing different user data.
3. The two-dimensional code according to claim 1, wherein said primitive two-dimensional code further comprises a functional area for storing encoding functional data.
4. The two-dimensional code according to claim 3, wherein the encoding function data includes: version information, mask information, error correction level information.
5. A two-dimensional code encoding method is characterized by comprising the following steps:
receiving graphic setting data and user data input by a user;
generating a graph outline area and a blank graph filling area according to the graph setting data;
acquiring a primitive two-dimensional code model, wherein the primitive two-dimensional code model consists of code elements and comprises a positioning area and a data area, and the positioning area is used for a reading program to determine the position of each area in the primitive two-dimensional code;
filling the user data into the data area according to a first preset coding and decoding rule to obtain a primitive two-dimensional code;
and repeatedly filling the primitive two-dimensional code into the pattern filling area to obtain a two-dimensional code pattern.
6. The two-dimensional code encoding method of claim 5, wherein before or after obtaining the primitive two-dimensional code model, further comprising:
segmenting the user data to obtain user subdata and sequence information of the user subdata;
filling the user data into the data area according to a first preset encoding and decoding rule to obtain a primitive two-dimensional code, and further comprising: and for each user subdata, filling the user subdata and the sequence information thereof into the data area according to a first preset coding and decoding rule to obtain a primitive two-dimensional code.
7. The two-dimensional code encoding method of claim 5, wherein the encoding function data is received or determined according to the user data while receiving the graphic setting data and the user data input by the user;
the primitive two-dimensional code model also comprises a functional area;
filling the user data into the data area according to a first preset encoding and decoding rule to obtain the element two-dimensional code, further comprising:
and filling the coding function data into the function area according to a second coding and decoding rule, and filling the user data into the data area according to a coding and decoding rule corresponding to the coding function data to obtain the primitive two-dimensional code.
8. The two-dimensional code encoding method of claim 7, wherein before or after obtaining the primitive two-dimensional code model, further comprising:
segmenting the user data to obtain user subdata and sequence information of the user subdata;
filling the coding function data into the function area according to a second coding and decoding rule, and filling the user data into the data area according to a coding and decoding rule corresponding to the coding function data to obtain a primitive two-dimensional code, and the step of obtaining the primitive two-dimensional code further comprises the following steps: and for each piece of user subdata, filling the coded function data and the sequence information of the user subdata into the function area according to a second preset coding and decoding rule, and filling the user subdata into the data area according to a coding and decoding rule corresponding to the coded function data to obtain the elementary two-dimensional code.
9. A two-dimensional code coding device is characterized by comprising:
the input module is used for receiving graphic setting data and user data input by a user;
the generating module is used for generating a graph outline area and a blank graph filling area according to the graph setting data;
the encoding module is used for acquiring a primitive two-dimensional code model, the primitive two-dimensional code model consists of code elements and comprises a positioning area and a data area, and the positioning area is used for a reading program to determine the position of each area in the primitive two-dimensional code;
the first filling module is used for filling the user data into the data area according to a first preset coding and decoding rule to obtain a primitive two-dimensional code;
and the second filling module is used for repeatedly filling the primitive two-dimensional code into the graph filling area to obtain a two-dimensional code graph.
10. A two-dimension code identification method is applicable to the two-dimension code obtained by the coding method of claim 5, and comprises the following steps:
collecting a two-dimensional code image;
searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area in an elementary two-dimensional code according to one or more searched positioning areas;
and decoding each code element in the data region according to a first preset coding and decoding rule to obtain user data.
11. A two-dimension code identification method is applicable to the two-dimension code obtained by the coding method of claim 6, and comprises the following steps:
collecting a two-dimensional code image;
searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area in an elementary two-dimensional code according to one or more searched positioning areas;
decoding each code element in the data area according to a first preset coding and decoding rule to obtain the user subdata and the sequence information of the user subdata;
determining the number of the elementary two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and re-executing the steps of positioning and decoding according to the number of the elementary two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and combining the user subdata according to the sequence information of the user subdata to obtain the user data.
12. A two-dimension code identification method is applicable to the two-dimension code obtained by the coding method of claim 7, and comprises the following steps:
collecting a two-dimensional code image;
searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area and a functional area in an elementary two-dimensional code according to one or more searched positioning areas;
decoding each code element in the functional region according to a second preset coding and decoding rule to obtain coding functional data;
and decoding each code element in the data area according to the coding and decoding rules corresponding to the coding function data to obtain the user data.
13. A two-dimensional code recognition method, adapted to the two-dimensional code obtained by the encoding method of claim 8, includes:
collecting a two-dimensional code image;
searching a positioning area in the two-dimensional code image, and positioning the range and the direction of a data area and a functional area in an elementary two-dimensional code according to one or more searched positioning areas;
decoding each code element in the functional area according to a second preset coding and decoding rule to obtain the sequence information of the coding functional data and the user subdata;
decoding each code element in the data area according to a coding and decoding rule corresponding to the coding function data to obtain user subdata;
determining the number of the elementary two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and re-executing the steps of positioning and decoding according to the number of the elementary two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and combining the user subdata according to the sequence information of the user subdata to obtain the user data.
14. The two-dimensional code recognition method according to any one of claims 10 to 13, further comprising, after searching for a positioning area in the two-dimensional code image:
and carrying out graph correction and transformation on the two-dimensional code graph by using the positioning area in the two-dimensional code image.
15. A two-dimension code recognition device is suitable for the two-dimension code obtained by the coding method of claim 5, and comprises the following steps:
the acquisition module is used for acquiring a two-dimensional code image;
the positioning module is used for searching a positioning area in the two-dimensional code image and positioning the range and the direction of a data area in a primitive two-dimensional code according to one or more searched positioning areas;
and the identification module is used for decoding each code element in the data area according to a first preset coding and decoding rule to obtain user data.
16. A two-dimension code recognition device is suitable for the two-dimension code obtained by the coding method of claim 6, and comprises the following steps:
the acquisition module is used for acquiring a two-dimensional code image;
the positioning module is used for searching a positioning area in the two-dimensional code image and positioning the range and the direction of a data area in a primitive two-dimensional code according to one or more searched positioning areas;
the identification module is used for decoding each code element in the data area according to a first preset coding and decoding rule to obtain the user subdata and the sequence information of the user subdata;
the analysis module is used for determining the number of the elementary two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and restarting the positioning module and the identification module according to the number of the elementary two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and the combination module is used for combining the user subdata according to the sequence information of the user subdata to obtain the user data.
17. A two-dimensional code recognition device, adapted to the two-dimensional code obtained by the encoding method of claim 7, comprising:
the acquisition module is used for acquiring a two-dimensional code image;
the positioning module is used for searching a positioning area in the two-dimensional code image and positioning the range and the direction of a data area and a functional area in a primitive two-dimensional code according to one or more searched positioning areas;
the first identification module is used for decoding each code element in the functional region according to a second preset coding and decoding rule to obtain coding functional data;
and the second identification module is used for decoding each code element in the data area according to the coding and decoding rule corresponding to the coding function data to obtain the user data.
18. A two-dimensional code recognition device, adapted to the two-dimensional code obtained by the encoding method of claim 8, comprising:
the acquisition module is used for acquiring a two-dimensional code image;
the positioning module is used for searching a positioning area in the two-dimensional code image and positioning the range and the direction of a data area and a functional area in the elementary two-dimensional code according to one or more searched positioning areas;
the first identification module is used for decoding each code element in the functional area according to a second preset coding and decoding rule to obtain the sequence information of the coding functional data and the user subdata;
the second identification module is used for decoding each code element in the data area according to the coding and decoding rules corresponding to the coding function data to obtain the user subdata;
the analysis module is used for determining the number of the elementary two-dimensional codes for storing different user subdata according to the sequence information of the user subdata, and restarting the positioning module, the first identification module and the second identification module according to the number of the elementary two-dimensional codes for storing different user subdata until all the user subdata and the sequence information thereof are obtained;
and the combination module is used for combining the user subdata according to the sequence information of the user subdata to obtain the user data.
19. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the two-dimensional code encoding method of any one of claims 5 to 8 when executing the computer program.
20. A computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for executing, when executed by a processor, the two-dimensional code encoding method according to any one of claims 5 to 8.
21. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the two-dimensional code recognition method according to any one of claims 10 to 14 when executing the computer program.
22. A computer-readable storage medium, characterized in that the computer-readable storage medium stores an executable computer program, which when executed by a processor implements the two-dimensional code recognition method of any one of claims 10 to 14.
CN202010315268.XA 2020-04-21 2020-04-21 Two-dimensional code encoding method and device, and two-dimensional code recognition method and device Active CN111523630B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010315268.XA CN111523630B (en) 2020-04-21 2020-04-21 Two-dimensional code encoding method and device, and two-dimensional code recognition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010315268.XA CN111523630B (en) 2020-04-21 2020-04-21 Two-dimensional code encoding method and device, and two-dimensional code recognition method and device

Publications (2)

Publication Number Publication Date
CN111523630A true CN111523630A (en) 2020-08-11
CN111523630B CN111523630B (en) 2024-04-19

Family

ID=71912066

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010315268.XA Active CN111523630B (en) 2020-04-21 2020-04-21 Two-dimensional code encoding method and device, and two-dimensional code recognition method and device

Country Status (1)

Country Link
CN (1) CN111523630B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112183689A (en) * 2020-09-30 2021-01-05 上海中商网络股份有限公司 Graphic code, graphic code generation method and graphic code spray printing method
CN112862045A (en) * 2021-01-15 2021-05-28 中钞印制技术研究院有限公司 Encryption graph structure, encoding method and device, and identification method and device
CN113205166A (en) * 2021-04-02 2021-08-03 领悦数字信息技术有限公司 Method and system for generating graphic codes
CN113449534A (en) * 2021-06-28 2021-09-28 歌尔股份有限公司 Two-dimensional code image processing method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951812A (en) * 2017-03-31 2017-07-14 腾讯科技(深圳)有限公司 Recognize method, device and the terminal of Quick Response Code
CN108764420A (en) * 2018-04-24 2018-11-06 中国人民银行印制科学技术研究所 A kind of Quick Response Code and its coding, have anti-fraud functional product at recognition methods
CN109271826A (en) * 2018-09-29 2019-01-25 连尚(新昌)网络科技有限公司 The method and apparatus of two dimensional code for identification
CN110288069A (en) * 2019-06-26 2019-09-27 百度在线网络技术(北京)有限公司 Two dimensional code generates and method, apparatus, equipment and the readable storage medium storing program for executing of parsing
CN110766831A (en) * 2019-09-29 2020-02-07 深圳深岚视觉科技有限公司 Dynamic two-dimensional code generation method and device and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106951812A (en) * 2017-03-31 2017-07-14 腾讯科技(深圳)有限公司 Recognize method, device and the terminal of Quick Response Code
US20190311169A1 (en) * 2017-03-31 2019-10-10 Tencent Technology (Shenzhen) Company Limited Two-dimensional code and method, terminal, and apparatus for recognizing two-dimentional code
CN108764420A (en) * 2018-04-24 2018-11-06 中国人民银行印制科学技术研究所 A kind of Quick Response Code and its coding, have anti-fraud functional product at recognition methods
CN109271826A (en) * 2018-09-29 2019-01-25 连尚(新昌)网络科技有限公司 The method and apparatus of two dimensional code for identification
CN110288069A (en) * 2019-06-26 2019-09-27 百度在线网络技术(北京)有限公司 Two dimensional code generates and method, apparatus, equipment and the readable storage medium storing program for executing of parsing
CN110766831A (en) * 2019-09-29 2020-02-07 深圳深岚视觉科技有限公司 Dynamic two-dimensional code generation method and device and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112183689A (en) * 2020-09-30 2021-01-05 上海中商网络股份有限公司 Graphic code, graphic code generation method and graphic code spray printing method
CN112183689B (en) * 2020-09-30 2021-06-25 上海中商网络股份有限公司 Graphic code generation method
CN112862045A (en) * 2021-01-15 2021-05-28 中钞印制技术研究院有限公司 Encryption graph structure, encoding method and device, and identification method and device
CN112862045B (en) * 2021-01-15 2024-03-15 中钞印制技术研究院有限公司 Encryption graphic structure, encoding method and device, and identification method and device
CN113205166A (en) * 2021-04-02 2021-08-03 领悦数字信息技术有限公司 Method and system for generating graphic codes
CN113449534A (en) * 2021-06-28 2021-09-28 歌尔股份有限公司 Two-dimensional code image processing method and device

Also Published As

Publication number Publication date
CN111523630B (en) 2024-04-19

Similar Documents

Publication Publication Date Title
CN111523630B (en) Two-dimensional code encoding method and device, and two-dimensional code recognition method and device
Mousavi et al. Hierarchical graph embedding in vector space by graph pyramid
US20090278844A1 (en) Method and apparatus for encoding/decoding 3d mesh information including stitching information
CN110517052A (en) A kind of two-dimensional code generation method, recognition methods, two dimensional code and equipment
CN111444513A (en) Firmware compiling optimization option identification method and device for power grid embedded terminal
JP3634574B2 (en) Information processing method and apparatus
CN107944525A (en) A kind of method and system of the expansion Quick Response Code capacity based on data segmentation
CN107292369A (en) The generation method and device of identification code
Liang et al. Reassembling shredded document stripes using word-path metric and greedy composition optimal matching solver
CN101923632B (en) Maxi Code bar code decoding chip and decoding method thereof
CN109360143A (en) A kind of digital watermark embedding and extracting method and system for big data
CN109977715B (en) Two-dimensional code identification method based on contour identification and two-dimensional code
Hadzic et al. UNI3-efficient algorithm for mining unordered induced subtrees using TMG candidate generation
Tian et al. BAN, a barcode accurate detection network
CN114663896B (en) Document information extraction method, device, equipment and medium based on image processing
CN113468906B (en) Graphic code extraction model construction method, identification device, equipment and medium
CN112862045B (en) Encryption graphic structure, encoding method and device, and identification method and device
CN109685186A (en) Extensive content customization method based on two-dimentional idle bit
CN111274508B (en) Service recommendation method, device, equipment and storage medium based on two-dimension code
Tasoulis et al. Unsupervised clustering using fractal dimension
CN108875868A (en) Method for positioning mobile robot, device and system
CN108280502B (en) QR code capacity improving method and terminal
US20240143897A1 (en) Generating a multi-modal vector representing a source font and identifying a recommended font utilizing a multi-modal font machine-learning model
CN113222088B (en) Method and device for generating circular code
US11328194B2 (en) Generation and recognition of barcode

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
TA01 Transfer of patent application right

Effective date of registration: 20210419

Address after: 100070 8th floor, building 2, No.5 Zhonghe Road, Science City, Fengtai District, Beijing

Applicant after: China Banknote Printing Technology Research Institute Co.,Ltd.

Applicant after: CHINA BANKNOTE PRINTING AND MINTING Corp.

Address before: 100070 science Road 5, Beijing, Fengtai District

Applicant before: SECURITY PRINTING INSTITUTE OF PEOPLE'S BANK OF CHINA

Applicant before: CHINA BANKNOTE PRINTING AND MINTING Corp.

TA01 Transfer of patent application right
CB02 Change of applicant information

Address after: 100070 8th floor, building 2, No.5 Zhonghe Road, Science City, Fengtai District, Beijing

Applicant after: China Banknote Printing Technology Research Institute Co.,Ltd.

Applicant after: China Banknote Printing and Minting Group Co.,Ltd.

Address before: 100070 8th floor, building 2, No.5 Zhonghe Road, Science City, Fengtai District, Beijing

Applicant before: China Banknote Printing Technology Research Institute Co.,Ltd.

Applicant before: China Banknote Printing and mint General Company

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant