CN100377173C - Two-dimensional code construction based on hexadecimal coding - Google Patents

Two-dimensional code construction based on hexadecimal coding Download PDF

Info

Publication number
CN100377173C
CN100377173C CNB200610064939XA CN200610064939A CN100377173C CN 100377173 C CN100377173 C CN 100377173C CN B200610064939X A CNB200610064939X A CN B200610064939XA CN 200610064939 A CN200610064939 A CN 200610064939A CN 100377173 C CN100377173 C CN 100377173C
Authority
CN
China
Prior art keywords
character
sequence
data
coding
characters
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
CNB200610064939XA
Other languages
Chinese (zh)
Other versions
CN1818935A (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.)
KEESAIL INTERCONNECTION (BEIJING) TECHNOLOGY CO.,LTD.
Original Assignee
Ziguang Jietong Science And Technology Co Ltd Beijing
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 Ziguang Jietong Science And Technology Co Ltd Beijing filed Critical Ziguang Jietong Science And Technology Co Ltd Beijing
Priority to CNB200610064939XA priority Critical patent/CN100377173C/en
Publication of CN1818935A publication Critical patent/CN1818935A/en
Application granted granted Critical
Publication of CN100377173C publication Critical patent/CN100377173C/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Abstract

The present invention relates to a method for building a two-dimensional code based on hexadecimal coding, which belongs to the technical field of information storage, transmission and identification. Firstly, data to be converted into the two-dimensional code by users is converted into a character sequence which is converted into a binary bit sequence according to a character coding comparison table, the binary bit sequence is coded redundantly before the binary digit sequence according to the accession of a data head and data types, the data head, the binary bit sequence and a redundant code are orderly combined from left to right to form a data bit stream, and figures in the data bit stream are filled into a two-dimensional code matrix to form a two-dimensional code picture. The method of the present invention has the advantages that the hexadecimal coding is adopted, the coding efficiency is increased, the redundancy of the two-dimensional code is small, and the quantity of included information is larger.

Description

A kind of method of the structure two-dimension code based on hexadecimal code
Technical field
The present invention relates to a kind of method of the structure two-dimension code based on hexadecimal code, belong to information stores, transmission and recognition technology field.
Background technology
Existing two-dimension code as shown in Figure 1, the bar code in the two-dimensional space canned data of level and vertical direction is called two-dimension code (2-dimensional bar code), can directly show English, Chinese, numeral, symbol, pattern; The storage data volume is big, can deposit the 1K character, and the direct reading of content of available scanning device need not to connect in addition database; Confidentiality height (can encrypt).
Two-dimension code can be divided into stack/row row formula two-dimension code and matrix type two-dimension sign indicating number, wherein is that bar code by the multirow cutting back piles up and forms on stack/row row formula two-dimension code form; The matrix type two-dimension sign indicating number is formed with the form of matrix, with " point " expression binary one, represents binary zero with " sky ", by the code that rearranges of " point " and " sky " on matrix respective element position.
The matrix type two-dimension sign indicating number claims the checkerboard type two-dimension code again, and it is to encode by black, the different distributions of white pixel in matrix at a coffin.On matrix respective element position, represent binary one with the appearance of point (square point, round dot or other shapes), not the occurring of point represents that binary " 0 ", the permutation and combination of point determined the meaning of matrix type two-dimension sign indicating number representative.The matrix type two-dimension sign indicating number is that a kind of novel graphical symbol automatically identifying and reading that is based upon on the bases such as computer image processing technology, assembly coding principle is handled code system.
The coding method of existing two-dimension code comprises:
Whether the quantity of first step data analysis inspection input data is maximum amount of data, if not enough maximum amount of data then fill with the fixed character sequence after the input data.
Each character conversion that second step data coding will be imported in the data according to the ascii character table becomes corresponding 8 binary bit sequences.
The binary bit sequence of the 3rd step Error Correction of Coding after will change be with a certain error correction formula generation error correcting code sequence, and after adding it to data bit stream sequence.
The 4th step mask carries out mask process to the data zone successively with 8 kinds of mask graphs, estimates the data behind every kind of mask, and selection optimum a kind of is final coding stream.
At present the shortcoming of two-dimension code is, resolution speed is slow, error correcting capability has much room for improvement, redundant big, to identification equipment requirement height.
Goal of the invention
The objective of the invention is to propose a kind of method of the structure two-dimension code based on hexadecimal code, improving the resolution speed and the error correcting capability of two-dimension code, and reduce redundancy.
The method based on the structure two-dimension code of hexadecimal code that the present invention proposes may further comprise the steps:
(1) user's the data that are converted into two-dimension code is judged, if Serial No., then with Serial No. as a decimal integer, and be converted into hexadecimal character string, when the number of this hexadecimal character sequence during less than thresholding N, in the character string leading zero, reach thresholding until the number of hexadecimal character sequence; If numeral and character mixed characters sequence when the character number of this character string during less than thresholding, are added the sequence of filling character after character string, reach thresholding N until the character number of character string, thresholding N is one greater than zero positive integer;
(2) user's the data that are converted into two-dimension code are judged that Serial No. then by the numerical coding table of comparisons, converts above-mentioned corresponding character string to binary bit sequence if yes; If numeral and character mixed sequence then convert above-mentioned corresponding character string to binary bit sequence by the mixed sequence coding table of comparisons;
(3) according to user's the data type that is converted into two-dimension code, add data head before above-mentioned binary bit sequence, if Serial No. then adds the M bit flag, M is one greater than zero positive integer; If numeral and character mixed characters sequence are then represented with the number X of character wherein, again number X is converted to corresponding binary number, X is one greater than zero positive integer;
(4) above-mentioned binary bit sequence is carried out redundancy encoding;
(5) data head of above-mentioned characterization data type, above-mentioned binary bit sequence and redundancy encoding are made up with any order, form data bit stream;
(6) numeral with each binary digit in the above-mentioned data bit stream is filled in the two-dimension code matrix, and 0 usefulness blank in the binary digit represents that 1 uses color showing, or 0 use color, and 1 usefulness blank is represented, forms the two-dimension code figure.
Character in the numerical coding table of comparisons in the said method is the character 0~9 and the A~F of expression sexadecimal number, totally ten six characters, and wherein the coding of any one character is with any tetrad bit representation, and the coding of 16 characters does not repeat.
In the said method, character in the hybrid coding table of comparisons is formed with the subclass of national or the international character set standard that adopts for the subclass of being made up of any one or above character in 0~90 character, totally ten six characters, wherein the coding of any one character is with any tetrad bit representation, and the coding of 16 characters does not repeat mutually.
The method that the present invention proposes based on the structure two-dimension code of hexadecimal code, have the following advantages: this method adopts hexadecimal code, and code efficiency is brought up to 100%; This method uses the redundancy encoding algorithm to carry out redundancy encoding, be a coding unit with four binary digits, so error correction power is stronger; In the two-dimension code that this method makes up, owing to feature patterns such as the view finding figure that does not have quick response matrix code in the prior art (Qrcode), positioning pattern, correction graphs, there are not extra expenses such as separator, ECI designator, version indicator, two-dimension code redundant little, so the quantity of information that two-dimension code comprised that this method makes up is bigger; This coding method allows the character except that numeral and English character is encoded.
Description of drawings
Fig. 1 is the structural representation of two-dimension code.
Fig. 2 is the two-dimension code that an embodiment of the inventive method makes up.
Among Fig. 1, the 1st, clear area, the 2nd, chromatic zones.
Embodiment
The method that the present invention proposes based on the structure two-dimension code of hexadecimal code, at first user's the data that are converted into two-dimension code are judged, if Serial No., then with Serial No. as a decimal integer, and be converted into hexadecimal character string, when the number of this hexadecimal character sequence during,, reach thresholding until the number of hexadecimal character sequence in the character string leading zero less than thresholding N; If numeral and character mixed characters sequence when the character number of this character string during less than thresholding, are added the sequence of filling character after character string, reach thresholding N until the character number of character string, thresholding N is one greater than zero positive integer; The data that are converted into two-dimension code to the user judge that Serial No. then by the numerical coding table of comparisons, converts above-mentioned corresponding character string to binary bit sequence if yes; If numeral and character mixed sequence then convert above-mentioned corresponding character string to binary bit sequence by the mixed sequence coding table of comparisons; According to user's the data type that is converted into two-dimension code, before above-mentioned binary bit sequence, add data head, if Serial No. then adds the M bit flag, M is one greater than zero positive integer; If numeral and character mixed characters sequence are then represented with the number X of character wherein, again number X is converted to corresponding binary number, X is one greater than zero positive integer; Binary bit sequence is carried out redundancy encoding; Data head, binary bit sequence and the redundancy encoding of characterization data type are made up with any order, form data bit stream; The numeral of each binary digit in the data bit stream is filled in the two-dimension code matrix, and 0 usefulness blank in the binary digit represents that 1 uses color showing, or 0 use color, and 1 usefulness blank is represented, forms the two-dimension code figure.
Character in the said method in the numerical coding table of comparisons is the character 0~9 and the A~F of expression sexadecimal number, totally ten six characters, and wherein the coding of any one character is with any tetrad bit representation, and the coding of 16 characters does not repeat.
Character in the above-mentioned hybrid coding table of comparisons is formed with the subclass of national or the international character set standard that adopts for the subclass of being made up of any one or above character in 0~90 character, totally ten six characters, wherein the coding of any one character is with any tetrad bit representation, and the coding of 16 characters does not repeat mutually.
Below introduce two embodiment of the inventive method.
Embodiment 1
If the data of user's input are Serial No. 123456789, the number thresholding N that establishes the hexadecimal character sequence is 10; Being converted into the hexadecimal character sequence is 75BCD15, because of its length less than thresholding 10, therefore in the leading zero of hexadecimal character sequence, be 00075BCD15, because the data of input are Serial No., therefore by the following numerical coding table of comparisons
Character Coding Character Coding
0 0000 8 1000
1 0001 9 1001
2 0010 A 1010
3 0011 B 1011
4 0100 C 1100
5 0101 D 1101
6 0110 E 1110
7 0111 F 1111
Convert the hexadecimal character sequence to binary bit sequence: 0,000 0,000 0,000 0,111 0,101 1,011 1,100 1,101 00010101, because data sequence to be converted is a Serial No., therefore before above-mentioned binary bit sequence, add M and be 4 zone bit 0000, be 0,000 0,000 0,000 0,000 0,111 0,101 1,011 1,100 1,101 0,001 0101; After this binary bit sequence carried out redundancy encoding with Reed Solomon redundancy encoding method, redundanat code is 0,110 1,010 1,100 0,100 0111, above-mentioned sign is converted into the combination successively from left to right of the data head 0000 of two-dimension code data type, above-mentioned binary bit sequence 0,000 0,000 00,000,111 0,101 1,011 1,100 1,101 0,001 0101 and redundancy encoding, form data bit stream, that is: 0,000 0,000 0,000 0,000 0,111 0,101 1,011 1,100 1,101 0,001 0,101 0,110 1,010 1,100 0,100 0111; By from top to bottom, order is from left to right inserted in the two-dimension code matrix successively with above-mentioned data bit stream, and represents blank with 0,1 expression color, and the two-dimension code figure of final formation is as shown in Figure 2.
Embodiment 2
If user input data is 12,345 the first and second the third fourths penta, and the number thresholding N that establishes the hexadecimal character sequence is 10; Therefore these input data be numeral and character mixed sequence, press the numerical character hybrid coding table of comparisons below
Character Coding Character Coding
0 0000 8 1000
1 0001 9 1001
2 0010 First 1010
3 0011 Second 1011
4 0100 Third 1100
5 0101 Fourth 1101
6 0110 Penta 1110
7 0111 Oneself 1111
Convert this character string to binary bit sequence: 0,111 0,101 1,011 1,100 1,101 0,001 0,101 1,010 1,011 11,001,101 1110, because data sequence to be converted is the numerical character mixed sequence, and character number is 10, therefore before above-mentioned binary bit sequence, add M and be 4 zone bit 1010, be 1,010 0,111 0,101 1,011 1,100 1,101 0,001 01,011,010 1,011 1,100 1,101 1110; After binary bit sequence carried out redundancy encoding with the CRC cyclic redundancy check encoding method, redundanat code is 1,010 0,110 1,100 0,111 0100, sign is converted into the combination successively from left to right of the data head of two-dimension code data type, above-mentioned binary bit sequence and redundancy encoding, forms data bit stream: 0,111 0,101 1,011 1,100 1,101 00,010,101 01,010 1,011 1,100 1,101 1,110 1,010 0,110 1,100 0,111 0100; By from top to bottom, order is from right to left inserted in the two-dimension code matrix successively with above-mentioned data bit stream, and represents blank with 1,0 expression color, and the two-dimension code figure of final formation is as shown in Figure 3.

Claims (3)

1. method based on the structure two-dimension code of hexadecimal code is characterized in that this method may further comprise the steps:
(1) user's the data that are converted into two-dimension code is judged, if Serial No., then with Serial No. as a decimal integer, and be converted into hexadecimal character string, when the number of this hexadecimal character sequence during less than thresholding N, in the character string leading zero, reach thresholding until the number of hexadecimal character sequence; If numeral and character mixed characters sequence when the character number of this mixed characters sequence during less than thresholding N, are added padding sequence after the mixed characters sequence, reach thresholding N until the character number of mixed characters sequence, thresholding N is one greater than zero positive integer;
(2) user's the data that are converted into two-dimension code are judged, if Serial No., then by the numerical coding table of comparisons, convert above-mentioned corresponding hexadecimal character sequence to binary bit sequence, if numeral and character mixed characters sequence, then press the mixed sequence coding table of comparisons, convert above-mentioned corresponding mixed characters sequence to binary bit sequence:
(3) according to being converted into the type of two-dimension code data, add data head before above-mentioned binary bit sequence, if Serial No. then adds the M bit flag, M is one greater than zero positive integer; If numeral and character mixed characters sequence are then added sign X, X is the number of character in the mixed characters sequence, number X is converted to corresponding binary number again, and X is one greater than zero positive integer;
(4) above-mentioned binary bit sequence is carried out redundancy encoding;
(5) data head of above-mentioned characterization data type, above-mentioned binary bit sequence and redundancy encoding are made up with any order, form data bit stream;
(6) numeral with each binary digit in the above-mentioned data bit stream is filled in the two-dimension code matrix, and 0 usefulness blank in the binary digit represents that 1 uses color showing, or 0 use color, and 1 usefulness blank is represented, forms the two-dimension code figure.
2. the method for claim 1, it is characterized in that: the character in the described numerical coding table of comparisons is the character 0~9 and the A~F of expression sexadecimal number, totally ten six characters, wherein the coding of any one character is with any tetrad bit representation, and the coding of 16 characters does not repeat mutually.
3. the method for claim 1, it is characterized in that: the character in the described mixed sequence coding table of comparisons is formed with the subclass of national or the international character set standard that adopts for the subclass of being made up of any one or above character in 0~90 character, totally ten six characters, wherein the coding of any one character is with any tetrad bit representation, and the coding of 16 characters does not repeat mutually.
CNB200610064939XA 2006-03-17 2006-03-17 Two-dimensional code construction based on hexadecimal coding Active CN100377173C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB200610064939XA CN100377173C (en) 2006-03-17 2006-03-17 Two-dimensional code construction based on hexadecimal coding

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB200610064939XA CN100377173C (en) 2006-03-17 2006-03-17 Two-dimensional code construction based on hexadecimal coding

Publications (2)

Publication Number Publication Date
CN1818935A CN1818935A (en) 2006-08-16
CN100377173C true CN100377173C (en) 2008-03-26

Family

ID=36918939

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB200610064939XA Active CN100377173C (en) 2006-03-17 2006-03-17 Two-dimensional code construction based on hexadecimal coding

Country Status (1)

Country Link
CN (1) CN100377173C (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100511271C (en) * 2006-11-16 2009-07-08 深圳市天朗时代科技有限公司 Two-dimensional decoding method
CN101149813B (en) * 2007-07-13 2012-02-29 中兴通讯股份有限公司 Matrix type colorful two-dimensional bar code encoding and decoding method
CN101645140B (en) * 2008-08-06 2016-10-05 华为技术有限公司 Two-dimensional code generation method, coding/decoding method and device
CN102208052A (en) * 2011-05-17 2011-10-05 大连海事大学 Container and container terminal management system
CN107579954B (en) * 2012-09-25 2021-06-04 创新先进技术有限公司 Method and system for generating identification information
CN103729902B (en) * 2012-10-15 2016-06-29 金蝶软件(中国)有限公司 Work attendance is registered method, work attendance register method, attendance record terminal and work attendance server
CN103065177B (en) * 2012-12-14 2015-05-27 苏州阔地网络科技有限公司 Coding method and system of two-dimension code
CN103034835B (en) * 2012-12-14 2015-07-15 苏州阔地网络科技有限公司 Two-dimensional code processing method and two-dimensional code client-side
CN106919882A (en) * 2015-12-28 2017-07-04 航天信息股份有限公司 A kind of method that two-dimentional digital content switchs to pure digi-tal symbolic coding
WO2018090192A1 (en) * 2016-11-15 2018-05-24 深圳大学 Image encryption and decryption method and apparatus based on optical encryption and decryption technique
CN106530206B (en) * 2016-11-15 2020-01-10 深圳大学 Image encryption and decryption method and device based on optical encryption and decryption technology
CN109240705A (en) * 2018-11-01 2019-01-18 广东工业大学 A kind of method, system and PLC device that host computer intelligent algorithm is displaced downwardly to PLC
CN113435557B (en) * 2020-05-09 2023-04-25 支付宝(杭州)信息技术有限公司 Two-dimensional code generation, decoding and identification method, device and equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4719450A (en) * 1985-02-16 1988-01-12 Sony Corporation Method and system for binary-to-decimal interconversion
US5557092A (en) * 1993-11-05 1996-09-17 Intermec Corporation Apparatus and method for 16-bit and numeric data collection using bar code symbologies
CN1452117A (en) * 2003-05-22 2003-10-29 深圳矽感科技有限公司 Two-D bar code encoding and decoding method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4719450A (en) * 1985-02-16 1988-01-12 Sony Corporation Method and system for binary-to-decimal interconversion
US5557092A (en) * 1993-11-05 1996-09-17 Intermec Corporation Apparatus and method for 16-bit and numeric data collection using bar code symbologies
CN1452117A (en) * 2003-05-22 2003-10-29 深圳矽感科技有限公司 Two-D bar code encoding and decoding method

Also Published As

Publication number Publication date
CN1818935A (en) 2006-08-16

Similar Documents

Publication Publication Date Title
CN100377173C (en) Two-dimensional code construction based on hexadecimal coding
CN1684492B (en) Image dictionary creating apparatus, coding apparatus, image dictionary creating method
CN104657698B (en) A kind of color 2 D code decoding method for carrying several black and white Quick Response Codes
CN103400174B (en) The coded method of a kind of Quick Response Code, coding/decoding method and system
CN109657769A (en) A kind of two-dimensional barcode information hidden method run-length coding based
CN103413160A (en) Method, device and system for encoding and decoding
WO2017198189A1 (en) Generation and reading method and device for colour identified colour two-dimensional figure code
CN101093553A (en) 2D code system, and identification method
CN103632179B (en) Code And Decode method and the device of Three-Dimensional Bar Code
CN104268615A (en) Encoding method and decoding method for color two-dimensional code
CN107563475B (en) Two-dimensional code encoding method and device
CN101515335A (en) Color two dimension bar code with high compression ratio Chinese character coding capability and its coding and decoding method
CN108596311A (en) A kind of generation method of trace to the source code and its check code
CN105279539A (en) Dot-matrix two-dimensional code coding and decoding
JP5788047B2 (en) Encoder for encoding text into matrix code symbols and decoder for decoding matrix code symbols
CN102741864A (en) Multilayer quick response code image encoding/decoding method and encoding/decoding device
EP2482231A1 (en) Method for encoding and decoding data on a matrix code symbol
CN110276428A (en) A kind of four-dimension code encoding and decoding method
CN110097159B (en) QR code security authentication method and system based on Hamming code
CN101159028B (en) Multiple graphics matrix type two-dimension bar code implementing method and device
CN103927572A (en) Encoding graph block and method and device for forming lattice graph through encoding graph block
CN112069850B (en) Service providing method, device, equipment and storage medium based on two-dimension code
KR20150067342A (en) Secure and lossless data compression
CN101025785A (en) Two-dimensional histogram digital image identification code
CN1458619A (en) Two-way readable two-dimensional bar code system and its reading method

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C41 Transfer of patent application or patent right or utility model
C56 Change in the name or address of the patentee
CP03 Change of name, title or address

Address after: Room 415, Violet building, east gate, Tsinghua University, Haidian District, Beijing, Beijing

Patentee after: UNIS JIETONG TECHNOLOGY Co.,Ltd.

Address before: Room 415, Violet building, east gate, Tsinghua University, Haidian District, Beijing, Beijing

Patentee before: Beijing Unisits Technology Co.,Ltd.

TR01 Transfer of patent right

Effective date of registration: 20090320

Address after: Room 413A, Violet building, east gate, Tsinghua University, Haidian District, Beijing, Beijing

Patentee after: Beijing purple best code technology Co.,Ltd.

Address before: Room 415, Violet building, east gate, Tsinghua University, Haidian District, Beijing, Beijing

Patentee before: UNIS JIETONG TECHNOLOGY Co.,Ltd.

ASS Succession or assignment of patent right

Owner name: BEIJING ZHIGUANG YOUMA SCIENCE + TECHNOLOGY CO., L

Free format text: FORMER OWNER: ZIGUANG JIETONG SCIENCE CO., LTD.

Effective date: 20090320

C56 Change in the name or address of the patentee

Owner name: ZIGUANG JIETONG SCIENCE CO., LTD.

Free format text: FORMER NAME: BEIJING UNISITS TECHNOLOGY CO., LTD.

ASS Succession or assignment of patent right

Owner name: KEESAIL INTERCONNECTION (BEIJING) TECHNOLOGY CO.,

Free format text: FORMER OWNER: BEIJING ZIGUANG YOUMA TECHNOLOGY CO., LTD.

Effective date: 20110905

C41 Transfer of patent application or patent right or utility model
COR Change of bibliographic data

Free format text: CORRECT: ADDRESS; FROM: 100084 HAIDIAN, BEIJING TO: 100191 HAIDIAN, BEIJING

TR01 Transfer of patent right

Effective date of registration: 20110905

Address after: 100191, Taixing building, 11 Garden East Road, Beijing, Haidian District 601

Patentee after: KEESAIL INTERCONNECTION (BEIJING) TECHNOLOGY CO.,LTD.

Address before: 100084 413A building, Violet building, east gate, Tsinghua University, Haidian District, Beijing, Beijing

Patentee before: Beijing purple best code technology Co.,Ltd.