CN111738389B - Two-dimensional code generation method and generation system - Google Patents

Two-dimensional code generation method and generation system Download PDF

Info

Publication number
CN111738389B
CN111738389B CN201910450786.XA CN201910450786A CN111738389B CN 111738389 B CN111738389 B CN 111738389B CN 201910450786 A CN201910450786 A CN 201910450786A CN 111738389 B CN111738389 B CN 111738389B
Authority
CN
China
Prior art keywords
data
dimensional code
code
codes
index data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910450786.XA
Other languages
Chinese (zh)
Other versions
CN111738389A (en
Inventor
马晓辉
张强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Jingbangda Trade Co Ltd
Beijing Jingdong Qianshi Technology Co Ltd
Original Assignee
Beijing Jingdong Qianshi Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Jingdong Qianshi Technology Co Ltd filed Critical Beijing Jingdong Qianshi Technology Co Ltd
Priority to CN201910450786.XA priority Critical patent/CN111738389B/en
Publication of CN111738389A publication Critical patent/CN111738389A/en
Application granted granted Critical
Publication of CN111738389B publication Critical patent/CN111738389B/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/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1408Methods for optical code recognition the method being specifically adapted for the type of code
    • G06K7/14172D bar codes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06KGRAPHICAL DATA READING; PRESENTATION OF DATA; RECORD CARRIERS; HANDLING RECORD CARRIERS
    • G06K7/00Methods or arrangements for sensing record carriers, e.g. for reading patterns
    • G06K7/10Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation
    • G06K7/14Methods or arrangements for sensing record carriers, e.g. for reading patterns by electromagnetic radiation, e.g. optical sensing; by corpuscular radiation using light without selection of wavelength, e.g. sensing reflected white light
    • G06K7/1404Methods for optical code recognition
    • G06K7/1439Methods for optical code recognition including a method step for retrieval of the optical code
    • G06K7/1443Methods for optical code recognition including a method step for retrieval of the optical code locating of the code in an image

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Electromagnetism (AREA)
  • General Health & Medical Sciences (AREA)
  • Toxicology (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention provides a two-dimensional code generation method and a two-dimensional code generation system, wherein the two-dimensional code is used for positioning and guiding an automatic guiding transport vehicle, and the two-dimensional code generation method comprises the following steps: acquiring a plurality of different index data and data to be coded representing position information; performing two-dimensional code encoding processing on a data group formed by the data to be encoded and any one index data to obtain a plurality of single codes, wherein one single code corresponds to one data group; and combining the plurality of single codes to generate a two-dimensional code. According to the method, the index data is added to encode the single codes, so that the generated two-dimensional codes are not simple and repeated for a plurality of single codes, and the technical problems of complex decoding and low positioning accuracy of the existing multi-code design method are solved.

Description

Two-dimensional code generation method and generation system
Technical Field
The invention relates to the technical field of electromechanical automatic control, in particular to a two-dimensional code generation method and system for positioning and guiding an automatic guiding transport vehicle.
Background
In recent years, with the rapid development of international and domestic logistics and electronic commerce industries, an Automatic Guided Vehicle (AGV) has great demands in application scenes such as intelligent unmanned warehouse, unmanned distribution and the like. The AGV rapidly recognizes the two-dimensional code of the guide landmark posted on the ground through a high-speed CCD camera arranged at the central position of the bottom surface of the vehicle body, and calculates the position and the posture of the current AGV in real time; and a high-speed CMOS camera arranged at the middle position above the vehicle body is used for identifying the two-dimensional code of the guide mark posted below the goods shelf and calculating the position and the orientation of the goods shelf relative to the vehicle body.
The conventional two-dimensional code for AGV positioning and guiding is mainly composed of a QR code shown in FIG. 1 (a) and a DataMatrix code shown in FIG. 1 (b). In the traveling process of the AGV, the ground can be continuously shot, and whether the two-dimensional code exists or not is judged. The current position of the AGV in the map can be obtained by identifying the code value of the two-dimensional code, and meanwhile, the information is fed back to the control console, so that the positioning function is realized. By calculating the offset distance and the offset angle of the two-dimensional code relative to the center of the image, whether the AGV deviates from a preset travel route or not can be obtained, correction can be timely made, and accidents such as derailment or collision and the like can be avoided, so that a guiding effect is achieved. In actual production, two-dimensional codes are easy to pollute, meanwhile, the stop position of the AGV deviates from the center of the two-dimensional codes, in order to ensure that the complete two-dimensional codes can be shot, a multi-code mode is often adopted, a QR code and a DataMatrix code in a 3X 3 mode (namely, 3 rows and 3 columns) are shown in FIG. 2, and the multi-code mode can also improve the stability of algorithm identification.
However, in the running process of the AGV, the camera acquires the ground image in a fixed period, and then detects and identifies the two-dimensional code in the image, so that the two-dimensional code identification algorithm must be completed in one period of the camera, the multi-code design methods of the QR code and the DataMatrix code are all repetition of a single two-dimensional code, and the position of the single two-dimensional code in the multi-code to be currently referenced needs to be determined during decoding and positioning, so that the technical problems of complex decoding and low positioning precision exist.
Disclosure of Invention
In view of the above, the embodiment of the invention provides a two-dimensional code generation method and a two-dimensional code generation system, so as to solve the technical problems of complex decoding and low positioning accuracy of the existing multi-code design method.
According to a first aspect of the present invention, there is provided a two-dimensional code generation method for positioning guidance of an automatic guided vehicle, the generation method including:
acquiring a plurality of different index data and data to be coded representing position information;
performing two-dimensional code encoding processing on a data group formed by the data to be encoded and any one of the index data to obtain a plurality of single codes, wherein one single code corresponds to one data group;
and combining the single codes to generate one two-dimensional code.
Optionally, performing two-dimensional code encoding processing on a data group formed by the data to be encoded and any one of the index data, including:
binary conversion is carried out on the data to be coded and the index data to obtain a plurality of character strings;
spatially arranging the characters in the plurality of character strings to obtain a character disc;
and masking the character disk to obtain one single code.
Optionally, the data to be encoded and the index data are represented by numbers, and binary conversion is performed on the data to be encoded and the index data, including:
binary conversion is carried out on the representation numbers of the data to be coded according to a first conversion rule;
binary converting the representation number of the index data according to a second conversion rule, wherein,
in the first conversion rule and the second conversion rule, the codeword distance of any two digits is greater than 1, and the codeword distance is the sum of absolute values of numerical differences of corresponding positions of two digit strings.
Optionally, spatially arranging the characters in the plurality of character strings includes:
acquiring a grid set with a preset shape;
dividing the grid set to obtain a first area and a second area;
arranging the character strings of the index data in the first area in a grid diagonal direction;
and arranging the character strings of the data to be coded in the second area in a grid diagonal direction.
Optionally, masking the character disc includes:
a mask disc consistent with the grid arrangement mode in the character disc is obtained, and binary values are arranged at intervals in the grid of the mask disc;
performing exclusive OR budget on binary values of corresponding positions in the mask disc and the character disc to obtain operation values of all grids;
and identifying different operation values through two different colors to obtain one single code.
Optionally, combining a plurality of the singlecodes includes:
a plurality of the singlecodes are combined in a centrosymmetric manner.
Optionally, the combined periphery of the single codes is rectangular, and after the single codes are combined in a central symmetry mode, the method further comprises:
and adding edges along the line to each single code at the periphery of the combination of the plurality of single codes.
Optionally, the periphery of the single code is rectangular, and after combining a plurality of single codes in a central symmetry mode, the method further includes:
adding a first pattern to the interval area of any two single codes at the periphery of the combination of the plurality of single codes;
adding the first pattern at the top corners of a plurality of the Shan Mazu composite peripheries;
and adding a second pattern to the interval region of the single codes in the combination of a plurality of the single codes.
Optionally, the first pattern is concentric circles composed of different colors alternately.
Optionally, at least one of the following is added outside the edges of a plurality of the single code combinations: calibrating triangles, coordinate axis directions and the data to be coded.
According to a second aspect of the present invention, there is provided a two-dimensional code generation system for positioning guidance of an automatic guided vehicle, the generation system comprising:
the acquisition module is used for acquiring a plurality of different index data and data to be coded which represents position information;
the processing module is used for carrying out two-dimensional code encoding processing on the data to be encoded and one index data to obtain a single code, and the index data corresponds to the single code one by one;
and the combination module is used for combining the single codes to generate one two-dimensional code.
Optionally, the processing module includes:
the conversion unit is used for binary conversion of the data to be coded and the index data to obtain a plurality of character strings;
the space arrangement unit is used for spatially arranging the characters in the plurality of character strings to obtain a character disc;
and the mask processing unit is used for carrying out mask processing on the character disk so as to obtain one single code.
Optionally, the data to be encoded and the index data are represented by numbers, and the conversion unit is configured to:
binary conversion is carried out on the representation numbers of the data to be coded according to a first conversion rule;
binary converting the representation number of the index data according to a second conversion rule, wherein,
in the first conversion rule and the second conversion rule, the codeword distance of any two digits is greater than 1, and the codeword distance is the sum of absolute values of numerical differences of corresponding positions of two digit strings.
Optionally, the spatial arrangement unit is configured to:
acquiring a grid set with a preset shape;
dividing the grid set to obtain a first area and a second area;
arranging the character strings of the index data in the first area in a grid diagonal direction;
and arranging the character strings of the data to be coded in the second area in a grid diagonal direction.
Optionally, the mask processing unit is configured to:
a mask disc consistent with the grid arrangement mode in the character disc is obtained, and binary values are arranged at intervals in the grid of the mask disc;
performing exclusive OR budget on binary values of corresponding positions in the mask disc and the character disc to obtain operation values of all grids;
and identifying different operation values through two different colors to obtain one single code.
Optionally, the combination module is configured to:
a plurality of the singlecodes are combined in a centrosymmetric manner.
Optionally, the combined periphery of a plurality of the singlecodes is rectangular, and the generating system further comprises a first adding module for:
and after combining the single codes in a central symmetry mode, adding edges to each single code along the line at the periphery of the combination of the single codes.
Optionally, the periphery of the single code is rectangular, and the generating system further includes a second adding module, configured to:
after combining a plurality of single codes in a central symmetry mode, adding a first pattern to the interval area of any two single codes at the periphery of the combination of the plurality of single codes;
adding the first pattern at the top corners of a plurality of the Shan Mazu composite peripheries;
and adding a second pattern to the interval region of the single codes in the combination of a plurality of the single codes.
Optionally, the first pattern is concentric circles composed of different colors alternately.
Optionally, the generating system further includes a third adding module for:
adding at least one of the following outside the edges of a plurality of single code combinations: calibrating triangles, coordinate axis directions and the data to be coded.
According to a third aspect of the present invention, there is provided a computer-readable storage medium storing computer instructions that, when executed, implement the two-dimensional code generating method according to any one of the embodiments of the first aspect.
According to a fourth aspect of the present invention, there is provided a two-dimensional code generating apparatus including:
a memory for storing computer instructions;
a processor coupled to the memory, the processor configured to implement the two-dimensional code generation method according to any of the embodiments of the first aspect based on computer instructions stored in the memory.
Embodiments of the present invention have the following advantages or benefits:
according to the method, the index data coding single codes are added, so that the plurality of single codes comprise the same data information to be coded and different index data information, the plurality of single codes are not completely consistent, furthermore, the generated two-dimensional codes are not simple repetition of the plurality of single codes, each single code serving as the current reference comprises the data to be coded representing the position information of the two-dimensional code and the index data representing the position of the current reference single code in the two-dimensional code, decoding and positioning are facilitated, and the technical problems that the existing multi-code design method is complex in decoding and low in positioning precision are solved.
Drawings
The above and other objects, features and advantages of the present invention will become more apparent by describing embodiments thereof with reference to the following drawings in which:
FIG. 1 (a) is a schematic diagram of a QR code;
FIG. 1 (b) is a schematic diagram of a DataMatrix code;
FIG. 2 is a schematic diagram of a 3×3 QR code and a DataMatrix code;
fig. 3 is a flowchart of a two-dimensional code generation method according to an embodiment of the present invention;
FIG. 4 (a) is a binary stream distribution pattern diagram according to an embodiment of the present invention;
FIG. 4 (b) is a binary stream distribution sequence diagram according to an embodiment of the present invention;
FIG. 5 is a mask plate of the character plate shown in FIG. 4 (a);
fig. 6 (a) is a 2×2 two-dimensional code according to an embodiment of the present invention;
fig. 6 (b) is another 2×2 two-dimensional code according to an embodiment of the present invention;
fig. 7 is a block diagram of a two-dimensional code generation system according to an embodiment of the present invention;
fig. 8 is a block diagram of a two-dimensional code generating apparatus according to an embodiment of the present invention.
Detailed Description
The present invention is described below based on examples, but the present invention is not limited to only these examples. In the following detailed description of the present invention, certain specific details are set forth in detail. The present invention will be fully understood by those skilled in the art without the details described herein. Well-known methods, procedures, and flows have not been described in detail so as not to obscure the nature of the invention. The figures are not necessarily drawn to scale.
Fig. 3 is a flowchart of a two-dimensional code generating method according to an embodiment of the present invention, where the two-dimensional code is used for positioning and guiding an automatic guided vehicle. Referring to fig. 3, the two-dimensional code generation method includes:
step S101, a plurality of different index data and a piece of data to be encoded representing the position information are acquired.
In the warehouse, the sorting area is generally divided into a storage area, a sorting area and a track area, the AGV needs to convey the goods shelf from the storage area to the sorting area, and the track area is a driving road when the AGV is used for conveying the goods shelf, so that the position information in the warehouse indicates the positions where the two-dimensional codes are pasted in the three areas.
Step S102, performing two-dimensional code encoding processing on a data set formed by the data to be encoded and any one index data to obtain a plurality of single codes, wherein one single code corresponds to one data set.
It should be understood that the index data corresponds to the single codes one by one, one single code includes the data to be encoded and one index data, and the index data plays a role in distinguishing the single codes, so that the number of the index data is determined by the number of the single codes in one two-dimensional code.
It should be noted that the data to be encoded and the index data are not limited to a single number, letter, or the like.
Step S103, combining the plurality of single codes to generate one two-dimensional code.
The plurality of single codes are combined to generate one two-dimensional code, so that the average area of the single codes in the two-dimensional code is smaller, and the code pattern structure is more compact; in addition, in actual production, the two-dimensional code is easy to pollute, and the multi-code design mode of the two-dimensional code can be used for positioning and decoding only by collecting any single code in the two-dimensional code through the camera, so that the success rate of AGV navigation positioning is greatly improved.
In the embodiment of the invention, the single codes in the multi-code design are encoded by adding the index data, so that the plurality of single codes comprise the same data information to be encoded and different index data information, the plurality of single codes are not completely consistent, the generated two-dimensional codes are not simple repetition of the plurality of single codes, each single code serving as the current reference comprises the data to be encoded representing the position information of the two-dimensional code and the index data representing the position of the current reference single code in the two-dimensional code, the decoding and the positioning are convenient, and the technical problems of complex decoding and low positioning precision of the existing multi-code design method are solved.
In an optional embodiment, step S102, performing two-dimensional code encoding processing on a data set formed by data to be encoded and any one of the index data, includes:
step S201, binary conversion is carried out on the data to be coded and the index data, and a plurality of character strings are obtained.
Step S202, the characters in the character strings are spatially arranged to obtain a character disk.
In step S203, the character disk is subjected to masking processing to obtain a single code.
The above three steps of step S102 are described in detail below.
(one) regarding step S201
The data to be encoded and the index data are represented by numbers, and in step S201, binary conversion is performed on the data to be encoded and the index data, including: binary conversion is carried out on the representation number of the data to be coded according to a first conversion rule; and carrying out binary conversion on the representation digits of the index data according to a second conversion rule, wherein the codeword distance of any two digits in the first conversion rule and the second conversion rule is greater than 1, and the codeword distance is the sum of absolute values of numerical differences of positions corresponding to the two character strings.
In order to increase the anti-interference capability of the two-dimensional code, the first conversion rule and the second conversion rule may adopt BCD (Binary-Coded device) like codes to perform Binary conversion. The codeword distance of any two numbers is larger than 1, so that the recognition rate of the two-dimensional code is improved, and the anti-interference capability of the two-dimensional code is further improved.
For the data to be encoded, any one of numbers 0 to 9 can be represented by a multi-dimensional binary number group, the dimension of the binary number group can be determined by the quantity of the position information, and the larger the position information is, the larger the dimension of the binary number group is. In one example, the data to be encoded represents any one of numbers 0-9, i.e. (x) 1 ,x 2 ,x 3 ,x 4 ,x 5 ) Binary expression formula, which is any number from 0 to 9, character string (x 1 ,x 2 ,x 3 ,x 4 ,x 5 ) Representing codeword x, codeword distance d is defined as:wherein x and y are codewords of any two digits from 0 to 9. The dimension 5 code words can represent 32 kinds of arranged code words, 10 binary codes as 0-9 are selected from the 32 kinds of code words, and the total is +.>In order to maximize the anti-interference capability of the two-dimensional code, the combination selects a codeword and simultaneously satisfies the following conditions: (1) the distance between codewords is at least 2; (2) the codeword contains at least two 0 s and two 1 s; (3) the distance between adjacent codewords is at least 3; (4) The number of 1 contained in the codeword is as large as possible, and thus, the correspondence of 10 codewords is as follows:
for index data, any one of numbers 0 to 9 may be represented by a binary array of dimensions different from the dimension of the data to be encoded, so as to more fully select each number in the index data, for example, a 6-dimensional binary array is selected to represent any one of numbers 0 to 9, i.e., d= (id) 5 ,id 4 ,id 3 ,id 2 ,id 1 ,id 0 ) Binary expression formula, which is any number from 0 to 9, character string (id 5 ,id 4 ,id 3 ,id 2 ,id 1 ,id 0 ) Representing a codeword. The codeword with the length of 6 has a plurality of combinations, and in order to maximize the anti-interference capability of the two-dimensional code, the codeword is selected to simultaneously satisfy the following conditions: (1) the distance between any two codewords is at least 4; (2) the codeword contains at least two 0 s and two 1 s. Under this condition, for example, 4 index data are required for a two-dimensional code (hereinafter abbreviated as 2×2 two-dimensional code) formed by arranging a plurality of single codes in two rows and two columns, the four index data may be 0 to 3, and the correspondence relationship of the four index data is as follows:
(II) regarding step S202
Step S202, spatially arranging the characters in the plurality of character strings, including: acquiring a grid set with a preset shape; dividing the grid set to obtain a first area and a second area; arranging the character strings of the index data in a first area in a grid diagonal direction; and arranging the character strings of the data to be encoded in the second area in the diagonal direction of the grid.
For example, the data to be encoded employs a 12-bit length digital combination X 5 X 4 X 3 X 2 X 1 X 0 Y 5 Y 4 Y 3 Y 2 Y 1 Y 0 A representation, and each digit in the data to be encoded is represented using a 5-dimensional binary array; the index data adopts a digit d with a bit length, and the digits in the index data are represented by a 6-dimensional binary number group, then the data to be encoded (the code value of the two-dimensional code is also called as a code value of the two-dimensional code) is represented by a binary number group with a length of 60, as follows:
each codeword in the index data is represented by a 6-dimensional binary array as follows:
d=(id 5 ,id 4 ,id 3 ,id 2 ,id 1 ,id 0 );
the binary stream composed of the 6-dimensional index array and the 60-dimensional code value array is spatially arranged according to step S202 as shown in fig. 4 (a) and fig. 4 (b). Wherein FIG. 4 (a) shows a distribution pattern of a binary stream, in this example, a grid set of preset shapes is a rectangle of unfilled corners, and a first region is id 5 、id 4 、id 3 、id 2 、id 1 、id 0 The occupied area, the second area is the area occupied by the code value, and the first area is arranged at one vertex angle of the rectangle, so that the visual sensor can be conveniently and quickly positioned to the first area. Fig. 4 (b) shows a distribution sequence of binary streams, that is, character strings of index data and character strings of data to be encoded are arranged in a diagonal direction of a grid, so that a layout of the binary streams is dispersed, which is beneficial to avoiding two-dimensional code recognition errors caused by excessive data aggregation and improving positioning accuracy of positioning by using the two-dimensional codes.
(III) regarding step S203
Step S203, performing mask processing on the character disc, including: a mask disc consistent with the grid arrangement mode in the character disc is obtained, and binary values are arranged in the grid interval of the mask disc; performing exclusive OR budget on binary values of corresponding positions in the mask disc and the character disc to obtain operation values of each grid; different operation values are marked by two different colors to obtain a single code.
For example, for the character disc shown in fig. 4 (a), fig. 5 shows the corresponding mask disc of fig. 4 (a), the mask disc shown in fig. 5 is identical to the grid arrangement pattern in the character disc shown in fig. 4 (a), binary values "0" and "1" are arranged in the mask disc shown in fig. 5, and the binary values at the corresponding positions in the mask disc and the character disc are subjected to exclusive-or budget, so that the operation value "0" or "1" is obtained.
The above-described identification of different operational values by two different colors may be performed, for example, by identifying a binary value "0" by white and a binary value "1" by black. It should be understood that the present invention is not limited to using black and white color to identify different operational values.
The binary stream formed by the character strings of the index data and the character strings of the data to be encoded is easy to have the phenomenon of identical value aggregation, and the character disc is subjected to exclusive OR budget through the mask disc, so that identical value aggregation blocks are alternately represented in different colors, the situation that square blocks with the same color are aggregated in the two-dimensional code is avoided as much as possible, the two-dimensional code is conveniently and correctly identified, and the positioning precision of positioning by using the two-dimensional code is improved.
Fig. 6 (a) and fig. 6 (b) show two 2×2 two-dimensional codes provided by the embodiment of the present invention, where the code value of the two-dimensional code in fig. 6 (a) is 000000-000000, and the code value of the two-dimensional code in fig. 6 (b) is 999999-999999. In fig. 6 (a) and 6 (b), only exemplary labels are given to the edges along line 11, first pattern 12, second pattern 13, calibration triangle 14, coordinate axis direction 15, and data 16 to be encoded. The following will further explain with reference to fig. 6 (a) and 6 (b).
In an alternative embodiment, step S103, combining a plurality of singlecodes includes: the plurality of single codes are combined in a central symmetry mode, so that the visual sensor is guaranteed to have consistent identification range and accuracy on the two-dimensional codes in all directions.
In an alternative embodiment, the combined periphery of the plurality of single codes is rectangular, and after the plurality of single codes are combined in a central symmetry mode, the method further comprises: around the combination of the single codes, edges 11 are added to each single code. The edge line 11 comprises straight lines in two directions perpendicular to each other along the periphery of the rectangle, and then the angle of the two-dimensional code can be calculated according to the direction of the edge line 11 in the image shot by the camera, so that the edge line 11 has an orientation function and can be also called an orientation line, the arrangement of the edge line 11 is favorable for improving the calculation precision of the AGV pose, and the edge line 11 can obtain the pose positioning precision of the sub-pixel level through the cooperation with the existing algorithm.
In an alternative embodiment, the periphery of the single code is rectangular, and after combining the plurality of single codes in a central symmetry mode, the method further comprises: adding a first pattern 12 to the interval area of any two single codes at the periphery of the combination of the plurality of single codes; adding a first pattern 12 at the top corners of the combined periphery of the plurality of single codes; the second pattern 13 is added to the space region of the single code within the combination of the plurality of single codes.
In the embodiment of the invention, the first pattern 12 and/or the second pattern 13 are arranged at the vertex angle of one single code, so that the visual sensor can conveniently and rapidly position the two-dimensional code and each single code in the two-dimensional code. Further, the first pattern 12 may be concentric circles (for example, concentric circles of alternating black and white as shown in fig. 6 (a) and 6 (b)) formed by alternating different colors, which has advantages of both rapid positioning and uniformity in each direction. In addition, the above arrangement modes of the edge line 11, the first pattern 12 and the second pattern 13 enable the edge line 11, the first pattern 12 and the second pattern 13 to be shared among single codes, so that the calculation amount of a detection algorithm of the two-dimensional code can be reduced, and the decoding efficiency is improved.
In an alternative embodiment, at least one of the following is added outside the edges of the plurality of single code combinations: calibration triangle 14, coordinate axis direction 15, data 16 to be encoded. Specifically, a calibration triangle 14 can be respectively arranged on four edges of the two-dimension code, and the calibration triangle 14 is used for being aligned with grid lines on the ground when the two-dimension code is pasted on the ground, so that the two-dimension code can be conveniently and neatly posted on the ground. The coordinate axis direction 15 may take two directions of X and Y in the plane coordinates to correspond to the two coordinate axis directions of X and Y in the console map, respectively. The data 16 to be encoded can be arranged at the left upper corner of the two-dimensional code as shown in fig. 6 (a) and 6 (b), so that the user can conveniently and quickly check the data. Further, the four sides of the two-dimensional code can be provided with calibration triangles 14 with different filling patterns, as shown in fig. 6 (a) and 6 (b), two calibration triangles 14 in the X direction adopt two different filling colors, and two calibration triangles 14 in the Y direction adopt two different filling colors, so that the angle of the two-dimensional code can be recognized more rapidly by combining the calibration triangles 14 and the coordinate axis direction 15.
It should be emphasized that, although the 2×2 two-dimensional code shown in fig. 6 (a) and 6 (b) is mostly used for the description of the generated two-dimensional code, the two-dimensional code generation method according to the present invention is not limited to generating the 2×2 two-dimensional code, and may be an n×n two-dimensional code (N represents an integer greater than 2).
Fig. 7 is a block diagram showing a two-dimensional code generating system according to an embodiment of the present invention, where two-dimensional codes are used for positioning and guiding an automatic guided vehicle. Referring to fig. 7, the two-dimensional code generation system includes:
an acquisition module 100, configured to acquire a plurality of different index data and a piece of data to be encoded representing position information;
the processing module 200 is used for performing two-dimensional code encoding processing on the data to be encoded and the index data to obtain a single code, wherein the index data corresponds to the single code one by one;
the combination module 300 is configured to combine the plurality of single codes to generate one two-dimensional code.
According to the two-dimensional code generation system provided by the embodiment of the invention, the index data coding single codes are added, so that the plurality of single codes comprise the same data information to be coded and different index data information, the plurality of single codes are not completely consistent, furthermore, the generated two-dimensional codes are not simple and repeated, each single code serving as the current reference comprises the data to be coded representing the position information of the two-dimensional code and the index data representing the position of the current reference single code in the two-dimensional code, decoding and positioning are facilitated, and the technical problems of complex decoding and low positioning precision of the existing multi-code design method are solved.
In an alternative embodiment, the processing module includes:
the conversion unit is used for binary conversion of the data to be coded and the index data to obtain a plurality of character strings;
the space arrangement unit is used for spatially arranging the characters in the plurality of character strings to obtain a character disc;
and the mask processing unit is used for performing mask processing on the character disk to obtain a single code.
In an alternative embodiment, the data to be encoded and the index data are represented by numbers, the conversion unit being adapted to:
binary conversion is carried out on the representation number of the data to be coded according to a first conversion rule;
binary converting the representation number of the index data according to a second conversion rule, wherein,
in the first conversion rule and the second conversion rule, the codeword distance of any two digits is greater than 1, and the codeword distance is the sum of absolute values of numerical differences of corresponding positions of two digit strings.
In an alternative embodiment, the spatial arrangement unit is for:
acquiring a grid set with a preset shape;
dividing the grid set to obtain a first area and a second area;
arranging the character strings of the index data in a first area in a grid diagonal direction;
and arranging the character strings of the data to be encoded in the second area in the diagonal direction of the grid.
In an alternative embodiment, the mask processing unit is configured to:
a mask disc consistent with the grid arrangement mode in the character disc is obtained, and binary values are arranged in the grid interval of the mask disc;
performing exclusive OR budget on binary values of corresponding positions in the mask disc and the character disc to obtain operation values of each grid;
different operation values are marked by two different colors to obtain a single code.
In an alternative embodiment, the combining module is configured to:
the plurality of singlecodes are combined in a centrosymmetric manner.
In an alternative embodiment, the combined periphery of the plurality of singlets is rectangular in shape, and the production system further includes a first add-on module for:
after a plurality of single codes are combined in a central symmetry mode, edges are added to the single codes along the line at the periphery of the combination of the plurality of single codes.
In an alternative embodiment, the periphery of the single code is rectangular in shape, and the production system further comprises a second adding module for:
after combining a plurality of single codes in a central symmetry mode, adding a first pattern to the interval area of any two single codes at the periphery of the combination of the plurality of single codes;
adding a first pattern at the top corners of the combined periphery of the plurality of single codes;
a second pattern is added to the spacing region of the single codes within the combination of the plurality of single codes.
In an alternative embodiment, the first pattern is concentric circles of alternating different colors.
In an alternative embodiment, the method further comprises a third adding module for:
adding at least one of the following outside the edges of the plurality of single code combinations: calibrating triangles, coordinate axis directions and data to be coded.
The two-dimensional code generating device of an embodiment of the invention comprises:
a memory for storing computer instructions;
and the processor is coupled to the memory and is configured to execute the two-dimensional code generation method based on the computer instructions stored in the memory.
The apparatus shown in fig. 8 is only one example of a two-dimensional code generating device, and should not be construed as limiting the function and scope of use of the embodiment of the present invention in any way. Referring to fig. 8, the two-dimensional code generating apparatus includes a processor 801, a memory 802, and an input-output device 803 connected by a bus. Memory 802 includes Read Only Memory (ROM) and Random Access Memory (RAM), and memory 802 stores various computer instructions and data required to perform system functions, processor 801 reads various computer instructions from memory 802 to perform various appropriate actions and processes. The input-output device 803 includes an input portion of a keyboard, a mouse, or the like; an output section including a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), etc., and a speaker, etc.; a storage section including a hard disk or the like; and a communication section including a network interface card such as a LAN card, a modem, and the like. The memory 802 also stores the following computer instructions to perform the operations specified by the two-dimensional code generation method according to the embodiment of the present invention: acquiring a plurality of different index data and data to be coded representing position information; carrying out two-dimensional code encoding processing on the data to be encoded and index data to obtain a single code, wherein the index data corresponds to the single code one by one; and combining the plurality of single codes to generate a two-dimensional code.
Accordingly, an embodiment of the present invention provides a computer-readable storage medium storing computer instructions that, when executed, implement operations specified by the two-dimensional code generation method described above.
The flowcharts, block diagrams in the figures illustrate the possible architectural framework, functions, and operations of the systems, methods, apparatus of the embodiments of the present invention, and the blocks in the flowcharts and block diagrams may represent a module, a program segment, or a code segment, which is an executable instruction for implementing the specified logical function(s). It should also be noted that the executable instructions that implement the specified logic functions may be recombined to produce new modules and program segments. The blocks of the drawings and the order of the blocks are thus merely to better illustrate the processes and steps of the embodiments and should not be taken as limiting the invention itself.
The various modules or units of the system may be implemented in hardware, firmware, or software. The software includes, for example, code programs formed using various programming languages such as JAVA, C/C++/C#, SQL, and the like. Although steps and sequences of steps of embodiments of the present invention are presented in terms of methods and apparatus, executable instructions for implementing the specified logical function(s) of the steps may be rearranged to produce new steps. The order of the steps should not be limited to only the order of the steps in the method and method illustration, but may be modified at any time as required by the function. For example, some of the steps may be performed in parallel or in reverse order.
Systems and methods according to the present invention may be deployed on a single or multiple servers. For example, different modules may be deployed on different servers, respectively, to form a dedicated server. Alternatively, the same functional units, modules, or systems may be distributed across multiple servers to relieve load pressure. The server includes, but is not limited to, a plurality of PCs, PC servers, blades, supercomputers, etc. connected on the same local area network and through the Internet.
The above description is only of the preferred embodiments of the present invention and is not intended to limit the present invention, and various modifications and variations may be made to the present invention by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (14)

1. The two-dimensional code generation method is characterized in that the two-dimensional code is used for positioning and guiding an automatic guiding transport vehicle, and the generation method comprises the following steps:
acquiring a plurality of different index data and data to be coded representing position information;
performing two-dimensional code encoding processing on a data group formed by the data to be encoded and any one of the index data to obtain a plurality of single codes, wherein one single code corresponds to one data group;
combining a plurality of the single codes to generate one two-dimensional code,
wherein the index data corresponds to the single codes one by one.
2. The generating method according to claim 1, wherein performing two-dimensional code encoding processing on a data group constituted by the data to be encoded and any one of the index data, comprises:
binary conversion is carried out on the data to be coded and the index data to obtain a plurality of character strings;
spatially arranging the characters in the plurality of character strings to obtain a character disc;
and masking the character disk to obtain one single code.
3. The generating method according to claim 2, wherein the data to be encoded and the index data are represented by numbers, and the binary converting the data to be encoded and the index data includes:
binary conversion is carried out on the representation numbers of the data to be coded according to a first conversion rule;
binary converting the representation number of the index data according to a second conversion rule, wherein,
in the first conversion rule and the second conversion rule, the codeword distance of any two digits is greater than 1, and the codeword distance is the sum of absolute values of numerical differences of corresponding positions of two digit strings.
4. The method of generating according to claim 2, wherein spatially arranging the characters in the plurality of character strings comprises:
acquiring a grid set with a preset shape;
dividing the grid set to obtain a first area and a second area;
arranging the character strings of the index data in the first area in a grid diagonal direction;
and arranging the character strings of the data to be coded in the second area in a grid diagonal direction.
5. The generating method according to claim 2, wherein masking the character disk comprises:
a mask disc consistent with the grid arrangement mode in the character disc is obtained, and binary values are arranged at intervals in the grid of the mask disc;
performing exclusive OR budget on binary values of corresponding positions in the mask disc and the character disc to obtain operation values of all grids;
and identifying different operation values through two different colors to obtain one single code.
6. The method of generating of claim 1, wherein combining a plurality of the singlecodes comprises:
a plurality of the singlecodes are combined in a centrosymmetric manner.
7. The method of generating according to claim 6, wherein the combined periphery of the plurality of single codes has a rectangular shape, and the method further comprises, after combining the plurality of single codes in a center-symmetrical manner:
and adding edges along the line to each single code at the periphery of the combination of the plurality of single codes.
8. The method of generating according to claim 6, wherein the periphery of the single code has a rectangular shape, and the method further comprises, after combining the plurality of single codes in a center-symmetrical manner:
adding a first pattern to the interval area of any two single codes at the periphery of the combination of the plurality of single codes;
adding the first pattern at the top corners of a plurality of the Shan Mazu composite peripheries;
and adding a second pattern to the interval region of the single codes in the combination of a plurality of the single codes.
9. The method of claim 8, wherein the first pattern is concentric circles of alternating different colors.
10. The method of generating of claim 6, wherein at least one of the following is added outside edges of a plurality of the single code combinations: calibrating triangles, coordinate axis directions and the data to be coded.
11. The utility model provides a two-dimensional code generation system, its characterized in that, two-dimensional code is used for the location direction of automated guided vehicle, the generation system includes:
the acquisition module is used for acquiring a plurality of different index data and data to be coded which represents position information;
the processing module is used for carrying out two-dimensional code encoding processing on the data to be encoded and one index data to obtain a single code, and the index data corresponds to the single code one by one;
and the combination module is used for combining the single codes to generate one two-dimensional code.
12. The generation system of claim 11, wherein the processing module comprises:
the conversion unit is used for binary conversion of the data to be coded and the index data to obtain a plurality of character strings;
the space arrangement unit is used for spatially arranging the characters in the plurality of character strings to obtain a character disc;
and the mask processing unit is used for carrying out mask processing on the character disk so as to obtain one single code.
13. A computer-readable storage medium storing computer instructions that, when executed, implement the two-dimensional code generation method of any one of claims 1 to 10.
14. A two-dimensional code generation apparatus, comprising:
a memory for storing computer instructions;
a processor coupled to the memory, the processor configured to perform implementing the two-dimensional code generation method of any of claims 1-10 based on computer instructions stored by the memory.
CN201910450786.XA 2019-05-28 2019-05-28 Two-dimensional code generation method and generation system Active CN111738389B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910450786.XA CN111738389B (en) 2019-05-28 2019-05-28 Two-dimensional code generation method and generation system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910450786.XA CN111738389B (en) 2019-05-28 2019-05-28 Two-dimensional code generation method and generation system

Publications (2)

Publication Number Publication Date
CN111738389A CN111738389A (en) 2020-10-02
CN111738389B true CN111738389B (en) 2024-03-01

Family

ID=72646299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910450786.XA Active CN111738389B (en) 2019-05-28 2019-05-28 Two-dimensional code generation method and generation system

Country Status (1)

Country Link
CN (1) CN111738389B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112291359B (en) * 2020-11-02 2022-07-26 浙江苍南仪表集团股份有限公司 Data transmission format processing method, system, device and readable storage medium
CN112861033B (en) * 2021-02-04 2022-04-01 北京三快在线科技有限公司 Method and device for executing service

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1963843A (en) * 2006-11-16 2007-05-16 深圳矽感科技有限公司 Two-dimension code, decode method thereof and printing publication used the same
CN101944187A (en) * 2010-09-07 2011-01-12 龚湘明 Two-dimensional micro code and processing method and device thereof
CN104281830A (en) * 2014-09-26 2015-01-14 合肥京东方显示光源有限公司 Two-dimension code identification method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8011596B2 (en) * 2008-02-13 2011-09-06 Hand Held Products, Inc. Machine readable 2D symbology printable on demand

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1963843A (en) * 2006-11-16 2007-05-16 深圳矽感科技有限公司 Two-dimension code, decode method thereof and printing publication used the same
CN101944187A (en) * 2010-09-07 2011-01-12 龚湘明 Two-dimensional micro code and processing method and device thereof
CN104281830A (en) * 2014-09-26 2015-01-14 合肥京东方显示光源有限公司 Two-dimension code identification method and device

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Jie Hao ; Shu-Tao Xia.Constructions of Optimal Binary Locally Repairable Codes With Multiple Repair Groups.《IEEE Communications Letters》.2016,全文. *
二维码技术的生成原理的分析与研究;张灵凤;冯锋;黄恒;;电子设计工程(17);全文 *

Also Published As

Publication number Publication date
CN111738389A (en) 2020-10-02

Similar Documents

Publication Publication Date Title
US10438038B2 (en) Decoding method and system for QR code with one damaged position detection pattern
CN104933387B (en) Rapid positioning and identifying method based on two-dimensional code decoding
CN101727580B (en) Image processing apparatus, image processing unit, and image processing method
CN109059922B (en) Mobile robot positioning method, device and system
CN111738389B (en) Two-dimensional code generation method and generation system
CN101908125B (en) QR (Quick Response) bar code decoding chip and decoding method thereof
CN108073966B (en) Conversion method of two-dimensional code and hole array code
US20020033820A1 (en) Information-related devices and methods
CN105069497A (en) Method for generating beautified two-dimensional code
CN101833641B (en) Bar code decoding chip
CN102999773B (en) Colorful lattice point code picture and three-dimensional bar code coding method thereof
CN104067296A (en) Methods and apparatus for one-dimensional signal extraction
CN104331689A (en) Cooperation logo and recognition method of identities and poses of a plurality of intelligent individuals
CN102568038A (en) Method for translating dimensions on two-dimensional engineering drawing to three-dimensional CAD (computer aided design) model
CN109978110B (en) Two-dimensional code for AGV positioning and navigation and decoding method
CN107563475A (en) A kind of coding method of Quick Response Code and device
Liu et al. Directional difference chain codes with quasi-lossless compression and run-length encoding
EP3996283B1 (en) Coding pattern, coding and reading methods for same, calibration board, and calibration method
CN105095937A (en) Visual identification method based on linear clustering circular array graphic code
CN101908128A (en) Aztec Code bar code decoding chip and decoding method thereof
KR20190098996A (en) Detection and Recognition of Remote Dense Visual Markers
CN112215308A (en) Single-order detection method and device for hoisted object, electronic equipment and storage medium
CN101833640B (en) The empty boundary pixel point computing module of bar and computing method thereof
CN109214486A (en) Three-dimension code, the generation method of three-dimension code and device, recognition methods and device
CN102710978B (en) The cursor-moving method of television set and device

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: 20210305

Address after: 101, 1st floor, building 2, yard 20, Suzhou street, Haidian District, Beijing 100080

Applicant after: Beijing Jingbangda Trading Co.,Ltd.

Address before: 8 / F, 76 Zhichun Road, Haidian District, Beijing 100195

Applicant before: BEIJING JINGDONG SHANGKE INFORMATION TECHNOLOGY Co.,Ltd.

Applicant before: BEIJING JINGDONG CENTURY TRADING Co.,Ltd.

Effective date of registration: 20210305

Address after: Room a1905, 19 / F, building 2, No. 18, Kechuang 11th Street, Daxing District, Beijing, 100176

Applicant after: Beijing Jingdong Qianshi Technology Co.,Ltd.

Address before: 101, 1st floor, building 2, yard 20, Suzhou street, Haidian District, Beijing 100080

Applicant before: Beijing Jingbangda Trading Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant