CN102592160B - Character two-dimension code encoding and decoding method for short message - Google Patents

Character two-dimension code encoding and decoding method for short message Download PDF

Info

Publication number
CN102592160B
CN102592160B CN201210014201.8A CN201210014201A CN102592160B CN 102592160 B CN102592160 B CN 102592160B CN 201210014201 A CN201210014201 A CN 201210014201A CN 102592160 B CN102592160 B CN 102592160B
Authority
CN
China
Prior art keywords
character
data
coding
bit stream
code word
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.)
Expired - Fee Related
Application number
CN201210014201.8A
Other languages
Chinese (zh)
Other versions
CN102592160A (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.)
Zhejiang Gongshang University
Original Assignee
Zhejiang Gongshang University
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 Zhejiang Gongshang University filed Critical Zhejiang Gongshang University
Priority to CN201210014201.8A priority Critical patent/CN102592160B/en
Publication of CN102592160A publication Critical patent/CN102592160A/en
Application granted granted Critical
Publication of CN102592160B publication Critical patent/CN102592160B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Error Detection And Correction (AREA)

Abstract

The invention relates to a character two-dimension code encoding and decoding method for a short message, which is used for solving the problems that the storage space occupation of a two-dimension code based on an image is large and the transmission efficiency is low, and has the advantages of capability of storing bar codes by characters, efficient transmission, and simple and efficient encoding and decoding algorithms. A character two-dimension code is a rectangular-shaped character two-dimension matrix module and the matrix module is composed of view finding sign units, a version number unit, a data specification number unit and a data region sign unit, wherein three view finding sign units are arranged and respectively located at the upper left corner, a upper right corner and the lower right corner of the matrix module; the version number unit is located in back of the view finding sign unit which is located at the upper left corner of the matrix module; the data specification number unit is located in back of the version number unit; and the data region sign unit is located in back of the data specification number unit. According to the character two-dimension code encoding and decoding method for the short message, character two-dimension bar codes are widely applied to electronic commerce.

Description

A kind of coding method of character Quick Response Code and coding/decoding method towards note
Technical field
The invention belongs to Two-Dimensional Bar-Code Technologies field, relate in particular to a kind of coding method of character Quick Response Code and coding/decoding method towards note.
Background technology
Two-dimensional bar code is developed so far and has obtained a lot of application, particularly makes Quick Response Code have the feature of information age with the combination of mobile terminal and wireless network, to life, has brought multiple application, can realize easily mobile ticketing.With no paper electronic certificate as a kind of novel, efficient, environmental protection, safety, mobile electron ticket has caused the broad interest of businessman and operator, many sight spots admission ticket, concert admission ticket, film ticket, car and boat ticket, delivery of cargo certificate etc. have all started to adopt this novel bill, the content of traditionally on paper bill and possessor's information preparation are become to a Quick Response Code figure, by mobile wireless network, send on user's mobile phone.When using this electronic ticket, businessman only need identify the Quick Response Code figure that user receives.This with no paper voucher has been realized papery voucher well to the transformation of electronic certificate, the transformation that material flows to electron stream, effectively supports the development of conditional electronic commercial affairs and mobile e-business.
Along with the arrival in 3G epoch, the combination of Quick Response Code and mobile phone mobile terminal application is more and more extensive, and real-time and promotion economic consumption aspect are had to very large effect.By electronic ticket, replace paper-bill, saved on the one hand resource, promote environmental protection, guaranteed on the other hand real-time and convenience.For current mobile ticketing, what mainly adopt is figure Quick Response Code (as DM code, QR code etc.), by multimedia message mode, sends to user mobile phone end.And multimedia message is communicated to after mobile phone terminal by multimedia message passage, need mobile phone terminal adaption function to carry out display graphics, this has limited the combination application of Quick Response Code and mobile terminal to a certain extent.
China Patent Publication No. CN 101149813A, open day is on 03 26th, 2008, name is called the decoding method that discloses a kind of matrix type colorful two-dimensional bar code in the scheme of " a kind of decoding method of matrix type colorful two-dimensional bar code ".It comprises the following steps: (A) scrambler obtains matrix form black-and-white two dimensional bar code to described information coding; (B) described scrambler, according to colour element piece corresponding to bit value, replaces to colour element piece by a plurality of monochrome pixels pieces in matrix form black-and-white two dimensional bar code in order; (C) matrix that described scrambler forms described colour element piece is arranged in rectangular shape.Weak point is, the decoding method of this matrix type colorful two-dimensional bar code, two-dimentional character after coding takes up space larger, to adopt multimedia message mode to process two-dimensional bar, can not on the terminal device of some low configurations, use, therefore, two barcode encodings that adopt the coding method of this matrix type colorful two-dimensional bar code to carry out, have limited Quick Response Code promoting the use of on some low configurating terminal devices such as mobile phone.
China Patent Publication No. CN 101639899A, open day is on 02 03rd, 2010, name is called in the scheme of " Quick Response Code coding method, coding/decoding method and device, terminal " and discloses a kind of Quick Response Code coding method, coding/decoding method and device, terminal.It comprises the following steps: obtain upper layer application data; Described upper layer application data are carried out to Quick Response Code coding, generate Quick Response Code, this Quick Response Code comprises: splicing symbol region and information data region.Weak point is, this Quick Response Code coding method, coding/decoding method and device, terminal, coding and decoding is complicated, Quick Response Code compressibility after Code And Decode is not high, takes up room also larger, on the terminal device of lower configuration, uses, processing speed is slow, be not easy to promoting the use of of two-dimensional bar, can not make full use of 3G communication, popularization and utilization to two-dimensional bar at aspects such as ecommerce, scientific research activities.
Summary of the invention
The present invention is in order to solve the deficiency that the existing two-dimensional bar storage space based on image takies greatly, transfer efficiency is low, provides a kind of and can store bar code, high efficiency of transmission, the Encoding and Decoding succinct efficient coding method of character Quick Response Code and coding/decoding method towards note with character.
To achieve these goals, the present invention is by the following technical solutions:
A kind of coding method of character Quick Response Code and coding/decoding method towards note, described character Quick Response Code is a rectangular-shaped character two-dimensional matrix module, and this matrix module is comprised of view finding symbolic unit, version number unit, data requirement unit and data field symbolic unit; Described view finding symbolic unit has three, lay respectively at the upper left corner, the upper right corner and the lower right corner of matrix module, described version number unit is positioned at after the view finding symbolic unit of matrix module left upper, described data requirement unit is positioned at after version number unit, and described data field symbolic unit is positioned at after gauge number unit; And version number unit, data requirement unit and data field symbolic unit, by row major, order from left to right, from top to bottom leaves in matrix module successively.
The coding method of described character Quick Response Code comprises the following steps: SDI is generated to a data bit stream that length is k according to coding rule; The data bit stream that is k according to length is selected error-correction level l; According to the algorithm of error-correction level l, the data bit stream that is k using length, as input, makes it in galois field, generate c error correction code word again, and after c error correction code word added to the data bit stream that length is k, forms total data bit stream; By according to the length of above-mentioned total data bit stream, generate the version number of character Quick Response Code, Bing Bagai version number is as input, according to Read-Solomon error correction algorithm, in galois field, generate d error correction code word, and after this d error correction code word added to the version number in version number unit, Bing Yu version number is converted to sign character together, totally three; Again by according to the length of above-mentioned total data bit stream, generate the gauge number of character Quick Response Code, and using this gauge number as input, according to Read-Solomon error correction algorithm, in galois field, generate e error correction code word, and after this e error correction code word added to data requirement in data requirement unit number, and be converted to sign character, totally three with together with data requirement number; According to version number, table look-up, recording matrix module needs the Quick Response Code character number of filling altogether again; By version number, gauge number, a d error correction code word and e the sign character that error correction code word generates, from the first row, by row major, order from left to right, from top to bottom leaves in matrix module successively; By each code conversion of above-mentioned total data bit stream, be eight-digit binary number, generate total bit stream; Every three one group of above-mentioned total bit stream is converted to in eight selected English alphabets, three of less thaies, in low level zero padding, change again after supplying three, by row major, order from left to right, from top to bottom leaves in matrix module successively; The vacant locations place that above-mentioned matrix module need to be filled to Quick Response Code character inserts character V, generates final character matrix module Quick Response Code.
The coding/decoding method of described character Quick Response Code comprises the following steps: when character matrix module is decoded to pre-service, three view finding symbolic units are identified as alphabetical V; First, remove after three view finding symbolic units, and then other character matrix module Quick Response Code is identified, by row major, it is a character string that order is from left to right deposited successively; Then, get the first six digits character of this character string, in galois field, carry out the decoding step of Read-Solomon error correction algorithm; The version number decoding according to Read-Solomon and data requirement number are searched corresponding form, draw sign character capacity, code word data number and the error correction code word number of this version, and remove first six digits character in this character string; According to the character capacity of version number, remove the filling symbol that add at end, and residue character string is transferred to bit stream, every eight is one group, generated codeword, eight of less thaies, in end zero padding, after supplying eight, change, generated codeword, has so just obtained total streams of code words again; In galois field, with Read-Solomon algorithm, total streams of code words is decoded, output code word data stream, is converted to eight-digit binary number by each code word data, generates bit stream; Then this bit stream is passed through to the computing of contrary coding, this bit stream is reduced to former data message output, complete decoding.
As preferably, described coding method adopts basic large WriteMode, described basic capitalization pattern-coding character set be capitalization A-Z, digital 0-9, nine conventional sign space:. ,/, %, _,, * and+; First described basic large WriteMode is divided into one group every two characters of data message, and is converted into 11 scale-of-two; If data message number to be encoded is not two multiple, last character after two one divisions is converted to six bits by its corresponding value so; Then binary number is connected in turn, and in binary number foremost, adds basic capitalization mode indicators 001 and character count designator; Then every eight of bit stream is divided into one group, the code word data of a byte of every group of regeneration, eight of less thaies at end, fill character zero, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.It is that main coding designs that basic large WriteMode be take capitalization character, this pattern is very effective with the hybrid coding of numeral and nine conventional punctuates to capitalization, do not need to carry out the switching between pattern, can greatly improve processing speed and the accuracy of character Quick Response Code when selecting basic large WriteMode, while is compressed encoding efficiently, save space, be convenient to character Quick Response Code and use on the terminal device of lower configuration.
As preferably, described coding method adopts substantially little WriteMode, described basic small letter pattern-coding character set be lowercase a-z, digital 0-9, nine conventional sign space:. ,/, %, _,, * and+.First substantially little WriteMode is divided into one group every two characters of data message, and is converted into 11 scale-of-two; If data message number to be encoded is not two multiple, last character after two one divisions is converted to six bits by its corresponding value so; Then binary number is connected in turn, and in binary number foremost, adds basic small letter mode indicators 001 and character count designator; Then every eight of bit stream is divided into one group, the code word data of a byte of every group of regeneration, eight of less thaies at end, fill character zero, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.Substantially little WriteMode be take lowercase character and is that main coding designs, this pattern is very effective with the hybrid coding of numeral and nine conventional punctuates to lowercase, do not need to carry out the switching between pattern, can greatly improve processing speed and the accuracy of character Quick Response Code when selecting basic small letter pattern, while is compressed encoding efficiently, save space, be convenient to character Quick Response Code and use on the terminal device of lower configuration.
As preferably, described coding method adopts digital punctuate pattern, described digital punctuate pattern-coding character set be digital 0-9,33 conventional sign space:. ,/, %, _,, * ,+,! , ", #, &, '), (,, ,-; , < ,=, >,,, [, ,], ^, `, {, |, } and ~.First numeral punctuate pattern is divided into one group every two characters of data message, and is converted into 11 scale-of-two; If data message number to be encoded is not two multiple, last character after two one divisions is converted to six bits by its corresponding value so; Then binary number is connected in turn; Then every eight of bit stream is divided into one group, the code word data of a byte of every group of regeneration, eight of less thaies at end, fill character zero, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.It is that main coding designs that numeral punctuate pattern be take digital punctuation character, this pattern is very effective to the hybrid coding of numeral and 33 conventional punctuates, do not need to carry out the switching between pattern, can greatly improve processing speed and the accuracy of character Quick Response Code when selecting digital punctuate pattern, while is compressed encoding efficiently, save space, be convenient to character Quick Response Code and use on the terminal device of lower configuration.
As preferably, described coding method adopts figure pattern, and described figure pattern coded character set is digital 0-9, and every three of data message to be encoded is divided into one group, and every group of data are converted to ten bits; If data message figure place to be encoded is not three integer multiple, remaining one-bit digital is converted to tetrad, or remaining binary digit is converted to seven bits, then to all data message codings, the binary digit of formation is coupled together, form bit stream; Before bit stream, add successively again figure pattern designator and character count designator; Every eight of this bit stream is divided into one group, the code word data of a byte of every group of regeneration, eight of less thaies at end, fill character zero, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.Figure pattern be take numerical character and is that main coding designs, this pattern is very effective to numerical coding, can greatly improve processing speed and the accuracy of character Quick Response Code when selecting figure pattern, while is compressed encoding efficiently, save space, be convenient to character Quick Response Code and use on the terminal device of lower configuration.
As preferably, described coding method adopts syntype, described syntype coded character set be capitalization A-Z, lowercase a-z, digital 0-9 and 33 conventional sign space:. ,/, %, _,, * ,+,! , ", #, &, '), (,, ,-; , < ,=, >,,, [, ,], ^, `, {, |, } and ~.This pattern, in operational process, can be eliminated the jitter phenomenon switching between pattern, can more efficient compressed encoding.The character set of syntype is totally nine ten five characters, the corresponding round values of each character, and each round values is converted to seven bits, then, to all data message codings, the binary digit of formation is coupled together, and forms bit stream; Then every eight of bit stream is divided into one group, the code word data of a byte of every group of regeneration, eight of less thaies at end, fill character zero, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.
As preferably, described coding method comprises model selection, according to the model application of the segmentation of data message and each segmentation, sets up form, calculates the length of the binary number that each section of associative mode generate.Because the character set mileage word with basic large WriteMode, substantially little WriteMode and digital punctuate pattern of figure pattern has common factor.If having data between pattern occurs simultaneously, when marking off figure pattern, need to judge whether figure pattern front and back are identical, if identical need add six of three of mode indicators and padding count indicator, and after the calculating that completes table value, application branch and bound method is searched for solution space number, finds out optimum mode combinations path.
The present invention can reach following effect:
(1), the character Quick Response Code of process the method Code And Decode, take storage space little, transfer efficiency is high, can on the terminal device of lower configuration, use, expand the usable range of character two-dimensional bar on terminal device, be convenient to promoting the use of of two-dimensional bar.
(2), in galois field, adopt Read-Solomon error correction algorithm to carry out Code And Decode, make Code And Decode efficiency fast, accuracy is high, Code And Decode is all simpler.
(3), character Quick Response Code is towards SMS, make some mobile terminals of not supporting multimedia message also very the two-dimensional bar that utilizes of aspect carry out the activities such as ecommerce.
(4), take full advantage of 3G communication, make two-dimensional bar be promoted and utilize at aspects such as ecommerce, scientific research activities.
Accompanying drawing explanation
Fig. 1 is a kind of rectangular-shaped character two-dimensional matrix modular structure schematic block diagram of the present invention.
Fig. 2 is the schematic diagram of the character Quick Response Code cataloged procedure symbolism of the embodiment of the present invention.
Fig. 3 is the decode procedure symbolism schematic diagram of the character Quick Response Code of the embodiment of the present invention.
Fig. 4 is the decoding process figure of the embodiment of the present invention.
Fig. 5 is the coding FB(flow block) of the embodiment of the present invention.
Fig. 6 is the solution space tree graph of the embodiment of the present invention.
In figure: 1, view finding symbolic unit; 2, version number unit; 3, data requirement unit; 4, data field symbolic unit.
Embodiment
Below in conjunction with the drawings and specific embodiments, the present invention will be further described.
Embodiment: a kind of coding method of character Quick Response Code and coding/decoding method towards note.As shown in Figure 1, Figure 2, shown in Fig. 3, Fig. 4, Fig. 5 or Fig. 6, character Quick Response Code is a rectangular-shaped character two-dimensional matrix module, this matrix module is comprised of view finding symbolic unit 1, version number unit 2, data requirement unit 3 and data field symbolic unit 4; View finding symbolic unit has three, lay respectively at the upper left corner, the upper right corner and the lower right corner of matrix module, version number unit is positioned at after the view finding symbolic unit of matrix module left upper, and data requirement unit is positioned at after version number unit, and data field symbolic unit is positioned at after gauge number unit; And version number unit, data requirement unit and data field symbolic unit, by row major, order from left to right, from top to bottom leaves in matrix module successively.
The coding method of character Quick Response Code comprises the following steps: SDI is generated to a data bit stream that length is k according to coding rule; The data bit stream that is k according to length is selected error-correction level l; According to the algorithm of error-correction level l, the data bit stream that is k using length, as input, makes it in galois field, generate c error correction code word again, and after c error correction code word added to the data bit stream that length is k, forms total data bit stream; By according to the length of above-mentioned total data bit stream, generate the version number of character Quick Response Code, Bing Bagai version number is as input, according to Read-Solomon error correction algorithm, in galois field, generate d error correction code word, and after this d error correction code word added to the version number in version number unit, Bing Yu version number is converted to sign character together, totally three; Again by according to the length of above-mentioned total data bit stream, generate the gauge number of character Quick Response Code, and using this gauge number as input, according to Read-Solomon error correction algorithm, in galois field, generate e error correction code word, and after this e error correction code word added to data requirement in data requirement unit number, and be converted to sign character, totally three with together with data requirement number; According to version number, table look-up, recording matrix module needs the Quick Response Code character number of filling altogether again; By version number, gauge number, a d error correction code word and e the sign character that error correction code word generates, from the first row, by row major, order from left to right, from top to bottom leaves in matrix module successively; By each code conversion of above-mentioned total data bit stream, be eight-digit binary number, generate total bit stream; Every three one group of above-mentioned total bit stream is converted to in eight selected English alphabets, three of less thaies, in low level zero padding, change again after supplying three, by row major, order from left to right, from top to bottom leaves in matrix module successively; The vacant locations place that above-mentioned matrix module need to be filled to Quick Response Code character inserts character V, generates final character matrix module Quick Response Code.
The coding/decoding method of character Quick Response Code comprises the following steps: when character matrix module is decoded to pre-service, three view finding symbolic units are identified as alphabetical V; First, remove after three view finding symbolic units, and then other character matrix module Quick Response Code is identified, by row major, it is a character string that order is from left to right deposited successively; Then, get the first six digits character of this character string, in galois field, carry out the decoding step of Read-Solomon error correction algorithm; The version number decoding according to Read-Solomon and data requirement number are searched corresponding form, draw sign character capacity, code word data number and the error correction code word number of this version, and remove first six digits character in this character string; According to the character capacity of version number, remove the filling symbol that add at end, and residue character string is transferred to bit stream, every eight is one group, generated codeword, eight of less thaies, in end zero padding, after supplying eight, change, generated codeword, has so just obtained total streams of code words again; In galois field, with Read-Solomon algorithm, total streams of code words is decoded, output code word data stream, is converted to eight-digit binary number by each code word data, generates bit stream; Then this bit stream is passed through to the computing of contrary coding, this bit stream is reduced to former data message output, complete decoding.
Coding method adopts 5 kinds of basic large WriteMode, substantially little WriteMode, digital punctuate pattern, figure pattern and syntypes.
Coding method adopts basic large WriteMode, described basic capitalization pattern-coding character set be capitalization A-Z, digital 0-9, nine conventional sign space:. ,/, %, _,, * and+; Basic small letter pattern-coding character set be lowercase a-z, digital 0-9, nine conventional sign space:. ,/, %, _,, * and+.
Numeral punctuate pattern-coding character set be digital 0-9,33 conventional sign space:. ,/, %, _,, * ,+,! , ", #, &, '), (,, ,-; , < ,=, >,,, [, ,], ^, `, {, |, } and ~.
Syntype coded character set be capitalization A-Z, lowercase a-z, digital 0-9 and 33 conventional sign space:. ,/, %, _,, * ,+,! , ", #, &, '), (,, ,-; , < ,=, >,,, [, ,], ^, `, {, |, } and ~.
Figure pattern coded character set is digital 0-9, they are all identical to the processing mode of character Quick Response Code for basic large WriteMode, substantially little WriteMode, digital punctuate pattern and syntype, just syntype is in operational process, can eliminate the jitter phenomenon switching between pattern, can more efficient compressed encoding.
First every two characters of data message are divided into one group, and are converted into 11 scale-of-two; If data message number to be encoded is not two multiple, two one that are close to are so divided into one group, and last character is converted to six bits by its corresponding value; Then binary number is connected in turn, and in binary number foremost, adds the designator of corresponding modes; Then every eight of bit stream is divided into one group, the code word data of a byte of every group of regeneration, eight of less thaies at end, fill character zero, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.
Figure pattern, is first every three of data message to be encoded to be divided into one group, more every group of data is converted to ten bits; If data message figure place to be encoded is not three integer multiple, unnecessary one-bit digital is converted to tetrad, or unnecessary binary digit is converted to seven bits, then to all data message codings, the binary digit of formation is coupled together, form bit stream; Before bit stream, add successively again figure pattern designator and character count designator; Every eight of this bit stream is divided into one group, the code word data of a byte of every group of regeneration, eight of less thaies at end, fill character zero, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.Figure pattern be take numerical character and is that main coding designs, this pattern is very effective to numerical coding, can greatly improve processing speed and the accuracy of character Quick Response Code when selecting figure pattern, while is compressed encoding efficiently, save space, be convenient to character Quick Response Code and use on the terminal device of lower configuration.
Coding method adopts model selection, according to the model application of the segmentation of data message and each segmentation, sets up form, calculates the length of the binary number of each section of associative mode generation.Because the character set mileage word with basic large WriteMode, substantially little WriteMode and digital punctuate pattern of figure pattern has common factor.If having data between pattern occurs simultaneously, when marking off figure pattern, need to judge whether figure pattern front and back are identical, if identical need add six of three of mode indicators and padding count indicator, and after the calculating that completes table value, application branch and bound method is searched for solution space number, finds out optimum mode combinations path.
In symbolic construction, removing the sign character of little box indicating after finger URL, is the English alphabet of a full-shape, and its kind has eight kinds.Version number, data requirement number and error correction character Shi You version number, the character of data requirement number conversion and four characters of four error correction code conversions that version number, data requirement number generate with Read-Solomon error correction algorithm in galois field territory, to guarantee that version number and data requirement number stagger the time and can correct a mistake identifying, so version number, data requirement number and error correction code word totally six characters.To press the order of row major, be placed in successively the first six digits that character symbols matrix is removed finger URL.The character of the error correction code conversion that the character that the character of data field comprises code word data conversion, code word data generate.And the size of data field is by version number and data requirement number common decision, when data field has rest position not fill, add filler V.
The view finding symbolic unit of the present embodiment is a solid inverted triangle, in identifying fast, can play the effect of location, due to the arrangement of position, the view finding symbol in the upper left corner and the upper right corner can be determined the col width of character Quick Response Code simultaneously, and the symbol in the upper right corner and the lower right corner can be determined line width.
Because the code word data number of the encoded rear generation of data message of different length is different, and the error correcting code number of words that different error-correction level generate is also different, these cause having the character Quick Response Code of different sizes corresponding with it, the character Quick Response Code of different sizes are called to the character Quick Response Code of different editions here.In addition, the numeric data code number of words that the character code of identical version holds and error correcting code number of words are also different, thus numeric data code number of words and error correcting code number of words should be recorded in to character code in the process that generates character code in so that identification.In character code, designed data requirement number, it has referred to the combined situation of numeric data code number of words and error correcting code number of words, and in the situation that symbol version is known, data requirement is number with regard to unique designation data code word number and error correcting code number of words.
Symbol version and error correction design:
The design of version specification is relevant with mobile phone screen size to Read-Solomon error correcting code.The error-correcting performance of known Read-Solomon error correcting code is that two code words can be corrected an alternative mistake, so error correction code word should be even number.Sign character is designed to eight, the corresponding triad number of each character in the present invention.Such as, establishing total code word number (numeric data code number of words+error correcting code number of words) is N, from code word to sign character the number in the process of conversion as following table 1 and table 2:
Table 1
N 3 5 7 9 11 13 15 17 19
8*N 24 40 56 72 88 104 120 136 152
Number of characters 8 14 19 24 30 35 40 46 51
N 21 23 25 27 29 31 33 35 37
8*N 168 184 200 216 232 248 264 280 296
Number of characters 56 62 67 72 78 83 88 94 99
Table 2
N 4 6 8 10 12 14 16 18 20
8*N 32 48 64 80 96 112 128 144 160
Number of characters 11 16 22 27 32 38 43 48 54
N 22 24 26 28 30 32 34 36 ?
8*N 176 192 208 224 240 256 272 288 ?
Number of characters 59 64 70 75 80 86 91 96 ?
Merge all number of characters, the number of characters that obtains generating has 35 kinds, in Table 3:
Table 3
Number of characters 8 11 14 16 19 22 24 27 30
Number of characters 32 35 38 40 43 46 48 51 54
Number of characters 56 59 62 64 67 70 72 75 78
Number of characters 80 83 86 88 91 94 96 99 ?
The size of mobile phone screen is considered, mobile phone screen one screen is supported according to statistics Chinese character number is many is four lines to ten two row in line number, and columns is six to walk to 12 row.Because of double byte character, can guarantee again the alignment of sign character, and wide at mobile phone terminal and Chinese character, so sign character is designed to double byte character.To mobile phone screen size, be behavior four lines to nine row, classify six number of characters that walk to 12 row supports as in Table 4.
Table 4
6 7 8 9 10 11 12
4 24 28 32 36 40 44 48
5 30 35 40 45 50 55 60
6 36 42 48 54 60 66 72
7 42 49 56 63 70 77 84
8 48 56 64 72 80 88 96
9 54 63 72 81 90 99 108
Reject identical number of characters, and contrast with the number of characters of table 2, designed the symbol of eight kinds of versions, be respectively 4 * 6,4 * 8,5 * 8,6 * 8,7 * 8,8 * 8,8 * 9,8 * 10.
Three view finding symbols in the sign character number of these versions, have all been comprised, Yi Ge symbol version number and a data gauge number.Consider mechanism for correcting errors, symbol version number and data requirement number are carried out to Error Correction of Coding in galois field, make these two characters that the alternative correct identification that can guarantee symbol version number and data requirement number when wrong occur in identifying.
Mistake of two code word energy error correction of Read-Solomon error correcting code, so to symbol version number and data requirement number two character design four error correcting codes, on version symbol in cannot hold, so expand the symbol capacity of each version, make the symbol of former eight kinds of versions from 4 * 6, 4 * 8, 5 * 8, 6 * 8, 7 * 8, 8 * 8, 8 * 9, 8 * 10 expand to 4 * 7, 4 * 9, 5 * 9, 6 * 9, 6 * 10, 7 * 10, 7 * 11, the symbol of 8 * 11 these eight kinds of versions, and the character that the symbol of each version need be filled and the number of characters that can represent are respectively as table 5.
Table 5
4×7 4×9 5×9 6×9 6×10 7×10 7×11 8×11
The number of characters representing 19 27 36 45 51 61 68 79
Need the number of characters of filling 0 0 1 2 0 2 1 4
Data requirement number design:
Data requirement number is to be placed on the first row of symbolic construction together with symbol version, and has added four error correcting codes.Data requirement number has shown the number of code word data and error correction code word in this symbolic construction, with this, carries out decoding work.Due to the symbol of same version, it can have the code word data of different numbers and the combination of error correction code word, so necessarily first will know numeric data code number of words and the error correcting code number of words of symbol when identification.The error correcting code number of words this situation corresponding different to the numeric data code number of words of same number, we have designed error-correction level, make the code word data of same number and the error correction code word that different error-correction level can obtain different numbers, realize different error correction requirements.The numeric data code number of words of holding of each version symbol and error correcting code number of words distribute as shown in table 6, and combination to the different pieces of information code word number of same version symbol and error correcting code number of words is wanted unique definite combination, and must be provided data requirement number, in Table 7.
Table 6
Table 7
The coding mode design of character Quick Response Code:
For cataloged procedure, the design of Data Coding Scheme is a most important link.Totally five kinds of the coding modes of character Quick Response Code, feature is as follows respectively:
Basic large WriteMode: coded character set be capitalization A-Z, digital 0-9,9 conventional sign space:. ,/, %, _,, * and+.Under this pattern, the generative process of code word data is as follows:
First, every two characters of data message are divided into one group, are made as C 1c 2, and be converted into 11 scale-of-two.Computing method are first character C 1corresponding value quadruplication 15, then with second character C 2corresponding value is added, i.e. C 1* 45+C 2, then the whole-number result obtaining being converted to 11 bits, the value that each character is corresponding is as shown in table 8.If data message number to be encoded is not two multiple, last character after two one divisions is converted to six bits by its corresponding value so.
Table 8
Then, binary number is connected in turn, and adds basic capitalization mode indicators and character count designator up front.In character Quick Response Code, mode indicators is eight, and character count indicator design is six, to data message length, is 63 with interior information, to be all denotable.
Finally, by every eight strokes of bit stream, divide the code word data that generates a byte, eight of less thaies at end, fill character 0, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.
Substantially little WriteMode: coded character set be lowercase a-z, digital 0-9,9 conventional sign space:. ,/, %, _,, * and+.This pattern is to take lowercase character to be that main coding designs, and substantially capitalizes Pattern Class seemingly, and in character set, the corresponding relation of character and numerical value is as shown in table 9.Character set is except upper and lower case letter difference, and other symbol is all identical, and coding rule is also the same.
Table 9
Numeral punctuate pattern: coded character set be digital 0-9,33 conventional sign space:. ,/, %, _,, * ,+,! , ", #, &, '), (,, ,-; , < ,=, >,,, [, ,], ^, `, {, |, } and ~.Coding rule and basic large WriteMode and substantially little WriteMode are identical, and in character set, the corresponding relation of character and numerical value is as shown in table 10, but the hybrid coding of this pattern logarithm sign point is very effective, does not need to carry out the switching between pattern.
Table 10
Figure pattern: coded character set is digital 0-9.For the coding of cardinar number word string, we are divided into one group by every three of data message to be encoded, then every group of data are converted to 10 bits; If data message figure place to be encoded is not three integer multiple, remaining one-bit digital is converted to tetrad, or remaining binary digit is converted to seven bits, then to all data message codings, the binary digit of formation is coupled together, form bit stream; Before bit stream, add successively again figure pattern designator and character count designator; Every eight of this bit stream is divided into one group, the code word data of a byte of every group of regeneration, eight of less thaies at end, fill character zero, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.
Syntype: coded character set be capitalization A-Z, lowercase a-z, digital 0-9,33 conventional sign space:. ,/, %, _,, * ,+,! , ", #, &, '), (,, ,-; , < ,=, >,,, [, ,], ^, `, {, |, } and ~.This pattern can be eliminated the jitter phenomenon switching between pattern, can more efficient compressed encoding.The character set of syntype is totally nine ten five characters, the corresponding round values of each character, and as shown in table 11, each round values is converted to seven bits.
Table 11
The selection optimization of Data Coding Scheme:
Because character Quick Response Code has five kinds of coding modes, and the coded character set of each coding mode has common factor, so when a string data message is encoded, the coding of character of occuring simultaneously in each character set should select to make to encode preferably pattern of integral body, rather than the character that only makes to occur simultaneously has high ratio of compression, this has just proposed the selection optimization between mixed mode.
Concerning basic large WriteMode, substantially little WriteMode and digital punctuate pattern, the computing method of each coding mode are identical, so the character code pattern of occuring simultaneously between each coded character set can be selected any one between 3 patterns.For the total optimization of encoding, the selection of common factor character code pattern just be take the coding mode of forerunner's character as main.The existence of syntype is the shake that prevents that pattern from switching, and the frequent interval coding of the coded character set character of each pattern is had to high-level efficiency, the expense of can minimizing pattern switching.In addition, the coding of figure pattern is more effective to cardinar number word length string, but consider the relation of figure pattern and basic capitalization, basic small letter and number mark pattern, so while there is the division of figure pattern, should consider not use figure pattern and the difference of using figure pattern.
When one group of specific data message is encoded, first according to each pattern-coding character set, data message is divided, to the common factor character of each character set in order with the master that is divided into of forerunner's character.What pay special attention to is digital division, and by computing cost, the numeric string that continuous number is no more than to 5 characters will not adopt figure pattern to divide, but identical with the mode division of forerunner's character of first numeral.After data message is divided, just formed a plurality of pattern segmentations, and for each pattern segmentation, be not that current pattern just can reach the global optimization of coding, also need the expense that before and after considering, the switching between pattern brings, so need the mixing of each pattern to be optimized here.For example, concerning a substantially little WriteMode, when previous pattern is basic large WriteMode, when a rear pattern is figure pattern, just need to consider whether can use syntype with a pattern above, and whether can merge into a substantially little WriteMode with a rear pattern.
Description based on above, the search of the similar tree construction of this way to solve the problem, the various pattern solutions of each division are as each branch of certain one deck of tree, search is from tree root, when searching a branch node, the formula of pressing code length calculates the lower bound of its all son's node, and node is pressed to lower bound ascending order and arrange in insertion ode table, complete after the search of this one deck, next from ode table, get first node circulation step just now, until the node of getting is leafy node, now found the path of the total optimization solution of data encoding, it is optimum model selection, and Here it is branch and bound method thought.
The basic thought of branch and bound method is on branch node, to estimate respectively in advance in the path of searching for downwards along its oneself child node, the boundary that objective function may be got (upper bound or lower bound), then its these son's nodes are kept in an ode table with the boundary that they may get, complete after the estimation of all son's nodes of this node, the node of choosing the value (maximal value or minimum value) on boundary according to target again from table is searched for downwards, until leafy node.Because must choose the node that extreme value is got on boundary from table, allly often with Priority Queues, safeguard this table, also can safeguard this table with pile structure.
The solution structure of branch and bound method is the structure of tree, and algorithm is from root node, in whole search procedure, often run into the value that a node just may be obtained its oneself child node estimation objective function, abandon the node no longer needing, add new node, with this, upgrade node table.From ode table, choose again the node that extreme value is got on boundary, and repeat said process.Along with deepening continuously of this process, the extreme value of total the estimated objective function of ode table just more and more approaches the solution of problem.When searching a leafy node, if the value of the objective function that this node is estimated is value in ode table, the determined solution in path along root node to leafy node is the optimum solution of problem so, and the value of the determined objective function of this leafy node is exactly the value addressing this problem.
For example, to data message " HTTP: //www.123456.cn ", first this information is divided into 4 sections, is made as J 1, J 2, J 3, J 4, corresponding as shown in table 12 respectively:
Table 12
Segmentation Character string Segmentation Character string Segmentation Character string Segmentation Character string
J 1 HTTP:// J 2 www. J 3 123456 J 4 .cn
J 1there are basic large WriteMode and two kinds of solutions of syntype, J 2there are two kinds of solutions of substantially little WriteMode and syntype, J 3there are figure pattern, substantially little WriteMode and 3 kinds of solutions of syntype, last J 4there are two kinds of solutions of little WriteMode and syntype.As shown in Figure 6, wherein, 1 representative is WriteMode substantially greatly for its solution space tree, the substantially little WriteMode of 2 representative; 4 represent figure pattern; 5 represent syntype.
Make tik be illustrated under certain search depth k, by segmentation k(k=1,2,3,4) use pattern i(i=1,2,3,4,5) the length lower bound of the binary number that generates of encoding.The basic large WriteMode of 5 kinds of coding modes, substantially little WriteMode, number mark pattern, figure pattern and syntype are respectively referred to as pattern 1, pattern 2, mode 3, pattern 4 and pattern 5.First, according to the model application of the segmentation of data message and each segmentation, set up form, as shown in table 13.
Table 13
Complete after the calculating of table value, application branch and bound method is searched for solution space number, and step is as follows:
First,, set point, root node is 1, two nodes are below 2,3.Segmentation J 1(character string is: HTTP: //) enabled mode 1 and pattern 5 codings, to calculate the binary number length generating and be respectively 48,58, computing method are in 4.2 joints.?
t 11=?48+(31+29+26)=134,t 51?=?58+(31+29+26)?=?144
Ode table is 2 (134), 3 (144)
Because 134 < 144, so next along node 2, down search for.
Secondly, the two son nodes of establishing node 2 are respectively node 4,5, segmentation J 2(character string is: www.) enabled mode 2 and pattern 5 codings,
t 22=?48+31+(29+26)=134,t 52?=?48+37+(29+26)?=?140
Ode table is 4 (134), 5 (140), 3 (144)
Because 134 < 140, so next along node 4, down search for.
Again, three son nodes of node 4 are made as respectively 6,7,8, segmentation J 3(character string is: 123456) enabled mode 4, pattern 2 and pattern 5 codings,
t 43=?48+31+29+(26)=134,t 23?=?48+31+33+(17)?=?129,t 53?=?48+31+51+(21)?=?151
Ode table is 7 (129), 6 (134), 5 (140), 3 (144), 8 (151)
Because next 129 < 134 < 151, so down search for along node 7.
Finally, two son nodes of node 7 are made as respectively 9,10, segmentation J 4(character string is: .cn) enabled mode 2 and pattern 5 coding, t 24=48+31+33+17=129, t 54=48+31+33+30=142
Ode table is 9 (129), 6 (134), 5 (140), 10 (142), 3 (144), 8 (151)
Because 129 < 142, so next along node 9, down search for.Known node nine is leafy node, so found optimum solution, is 129, and path is node 1 → 2 → 4 → 7 → 9, is pattern 1 → pattern 2 → mode 3 → pattern 2, and pattern 1 → pattern 2 is pattern optimal selection.
The data encoding of data encoding character Quick Response Code is divided into two steps.First be to select optimization model to encode to data message by mode selection optimizing algorithm, generate bit stream.Second step is converted to code word data bit stream exactly.Wherein the mode indicators of each pattern is in Table 14.
Table 14
Coding mode Designator Coding mode Designator
Basic large WriteMode 001 Figure pattern 100
Substantially little WriteMode 010 Syntype 101
Numeral punctuate pattern 011 ? ?
Data message " HTTP: //www.123456.cn " is divided into 2 sections according to mode selection optimizing algorithm.First segmentation 1 " HTTP: // " has 7 characters, so 6 of character count designators are 000111, the mode indicators of pattern 1 is 001, the 39(7/2*11+6 that " HTTP: // " is converted to) a position bit stream is:
001010011100110110011011010101000100111
Segmentation 2 " www.123456.cn " has 13 characters, six of character count designators are 001101, the mode indicators of pattern 2 is 010, the 72(13/2*11+6 that character string is converted to) position a bit stream be: 01,111,110,100,100,000,001,001,001,101,101,110,100,110,111,101,100,100,111 1 010110000001101;
So the bit stream after the final coding of data message is:
001000111,001010011100110110011011010101000100111,0100011?01,0111111010010000000100100110110111010011011110110010011110?10110000001101;
Wherein comma is in order to distinguish cutting apart of 1,2 of role indicator and data bit stream and pattern.
Next the bit stream generating is changed generated data code word: first to every eight one groupings of bit stream, the end filling binary number 0 that is grouped in that less than is eight is eight-digit binary number string.Then each group of having divided is converted into the integer data code word of a byte, goes on successively, generated code word data stream.
Totally one hundred two ten nine of the bit streams generating in this example, last grouping only has 1, fills seven 0, and symbiosis becomes 17 code word datas, and the code word data stream of formation is:
35,148,230,205,170,39,70,191,72,9,54,233,189,147,214,?6,128。
Error Correction of Coding:
Should given data code word number and error-correction level before Error Correction of Coding, thus need to carry out validity checking to code word data number and error-correction level, with reference to table 14.From data requirement, the code word data of similar number can have the error correction code word of different numbers, and this is also the formation of error-correction level.The maximum data code word of character Quick Response Code coding is 26, when code word data number is 25, cannot encode, and can point out to re-enter data and encode.Code word data number is 1,2,3 in addition ..., 18,20th, have error-correction level, and number is 19,21,22,23,24,26 select without error-correction level, only have the error correction code word of certain number, due to the size that these restrictions are all mobile phone screens.Arranging of the code word data of various numbers and error-correction level is as shown in Table 15.
Table 15
Numeric data code number of words Have or not error-correction level Grade L error correcting code number Grade H error correcting code number Numeric data code number of words Have or not error-correction level Grade L error correction yardage Grade H error correction yardage
1 1 6 12 14 1 2 8
2 1 8 14 15 1 4 10
3 1 4 10 16 1 6 12
4 1 6 12 17 1 2 8
5 1 2 8 18 1 4 10
6 1 4 10 19 0 6 ?
7 1 6 12 20 1 2 8
8 1 2 8 21 0 4 ?
9 1 4 10 22 0 6 ?
10 1 6 12 23 0 2 ?
11 1 2 8 24 0 4 ?
12 1 4 10 25 2 ? ?
13 1 6 12 26 0 2 ?
17 code word datas that example " HTTP: //www.123456.cn " is generated:
35,148,230,205,170,39,70,191,72,9,54,233,189,147,?214,6,128
Carry out Error Correction of Coding, suppose that error-correction level is chosen as L, error correcting code number is 2.Table look-up known, the number of code word data and error-correction level are all satisfactory, and by Read-Solomon algorithm, encoding, to obtain error correction streams of code words be 221,130.After code word data stream and error correction streams of code words are arranged in order, total streams of code words of generation is:
35,148,230,205,170,39,70,191,72,9,54,233,189,147,?214,6,128,221,130。
Symbolism
The total streams of code words being generated by data encoding and Error Correction of Coding should first be converted to bit stream before symbolism, then bit stream was generated to various sign characters, and rule is as table 16.The selection of eight kinds of sign characters is according to the easy to identify and difficult principle of obscuring, and uses optical character recognition to test draw at terminal.Generate after sign character string, by the version number of selecting, according to the placement of each sign character, sequentially generate character Quick Response Code.
Table 16
Scale-of-two Sign character Scale-of-two Sign character
000 A 100 S
001 K 101 T
010 M 110 V
011 O 111 Z
In the present embodiment, total code word number is 19(17+2), numeric data code number of words and error correcting code number of words are to being (17,2), so the Ke get version number of tabling look-up is 100, data requirement number is 101, is divided into and is converted to sign character S and T.Version number, be 100(4), data requirement number is 101 (5) inputs in galois field as RS error-correcting code, four error correction code words of generation are 2,1,3,6, are converted to sign character and are respectively M, K, O, V.Total streams of code words:
35,148,230,205,170,39,70,191,72,9,54,?233,189,147,?214,6,128,221,130
After reverse, be:
130,221,?128,6,?214,?147,?189,?233,?54,9,?72,?191,?70,?39,170,?205,?230,?148,35
First be converted to bit stream, then a binary number is converted to a sign character repeatedly, and the result of conversion is:
SATTVVAAAKTTOMMOTZOVSSVVAMMSSMZZMKSM?OVTMVOOVOMMSKAV
By the version number four of selecting, the character Quick Response Code of generation is 6 * 10 sizes, does not need to fill extra sign character, and this example " HTTP: //www.123456.cn " is placed after sign character according to symbolic construction, and the character Quick Response Code of generation as shown in Figure 2.
The process flow diagram of the decode procedure of the character Quick Response Code of the present embodiment as shown in Figure 4, start, pointer P is pointed to the initial position of bit stream, then, read 3 bit pattern designator P=P+3, deterministic model M, then read 6 character count designator P=P+6, deterministic model coded character length L, and then carrying out the decoding of the contrary coding of pattern M processes, make P=P+L point to next pattern, then whether bit stream is finished to judge, when bit stream does not finish, return and read 3 bit pattern designator P=P+3, if bit stream finishes, after output information, finish decoding work.
The concrete steps of the character Quick Response Code decode procedure of the present embodiment are as follows:
The first step, positions character matrix, determines the size of matrix, and the symbol in recognition matrix, is shown in Fig. 6.Identified and rear character matrix has been removed to all sign characters after three finger URLs, by the order of row major, depositing is successively a character string.
Second step, get character string first six digits character and in galois field, carry out the decoding step of Read-Solomon error correction algorithm, if made mistakes in first step identifying and number of errors is less than or equal to two, Read-Solomon algorithm decodes version number and data requirement number smoothly so.
The 3rd step, the version number decoding according to Read-Solomon and data requirement number are looked into corresponding form, draw the sign character capacity of this version and the number of code word data and error correction code word.
The 4th step, according to the character capacity of version symbol, the character string drawing from the first step is removed the filling symbol that add at end, and transfers bit stream to removing front 6 characters residue character string.
The 5th step, divides the bit stream that the 4th step generates, and every eight one groupings generate the code word of a byte, and regeneration code word after the afterbody interpolation filler zero that less than is eight, has so just obtained total streams of code words.
The 6th step is decoded by the streams of code words that Read-Solomon algorithm generates the 5th step in galois field, output code word data stream or miscue information.
The 7th step, if the 6th step prompting error message is identifying failure, error rate is greater than error correction rate, identification again.If output code word data stream, is converted to eight-digit binary number by each code word data, generate bit stream.
The 8th step, the bit stream that the 7th step is generated, by the method for contrary coding, is reduced to former data message output, completes decoding.
Although described by reference to the accompanying drawings embodiments of the present invention, not limited by above-described embodiment, those of ordinary skills can make various distortion or modification in the scope of claims.

Claims (6)

1. the coding method of character Quick Response Code and coding/decoding method towards a note, it is characterized in that, described character Quick Response Code is a rectangular-shaped character two-dimensional matrix module, and this matrix module is comprised of view finding symbolic unit, version number unit, data requirement unit and data field symbolic unit; Described view finding symbolic unit has three, lay respectively at the upper left corner, the upper right corner and the lower right corner of matrix module, described version number unit is positioned at after the view finding symbolic unit of matrix module left upper, described data requirement unit is positioned at after version number unit, and described data field symbolic unit is positioned at after gauge number unit; And version number unit, data requirement unit and data field symbolic unit, by row major, order from left to right, from top to bottom leaves in matrix module successively;
The coding method of described character Quick Response Code comprises the following steps: SDI is generated to a data bit stream that length is k according to coding rule; The data bit stream that is k according to length is selected error-correction level 1; According to the algorithm of error-correction level 1, the data bit stream that is k using length, as input, makes it in galois field, generate c error correction code word again, and after c error correction code word added to the data bit stream that length is k, forms total data bit stream; By according to the length of above-mentioned total data bit stream, generate the version number of character Quick Response Code, Bing Bagai version number is as input, according to Read-Solomon error correction algorithm, in galois field, generate d error correction code word, and after this d error correction code word added to the version number in version number unit, Bing Yu version number is converted to sign character together, totally three; Again by according to the length of above-mentioned total data bit stream, generate the gauge number of character Quick Response Code, and using this gauge number as input, according to Read-Solomon error correction algorithm, in galois field, generate e error correction code word, and after this e error correction code word added to data requirement in data requirement unit number, and be converted to sign character, totally three with together with data requirement number; According to version number, table look-up, recording matrix module needs the Quick Response Code character number of filling altogether again; By version number, gauge number, a d error correction code word and e the sign character that error correction code word generates, from the first row, by row major, order from left to right, from top to bottom leaves in matrix module successively; By each code conversion of above-mentioned total data bit stream, be eight-digit binary number, generate total bit stream; Every three one group of above-mentioned total bit stream is converted to in eight selected English alphabets, three of less thaies, in low level zero padding, change again after supplying three, by row major, order from left to right, from top to bottom leaves in matrix module successively; The vacant locations place that above-mentioned matrix module need to be filled to Quick Response Code character inserts character V, generates final character matrix module Quick Response Code;
The coding/decoding method of described character Quick Response Code comprises the following steps: when character matrix module is decoded to pre-service, three view finding symbolic units are identified as alphabetical V; First, remove after three view finding symbolic units, and then other character matrix module Quick Response Code is identified, by row major, it is a character string that order is from left to right deposited successively; Then, get the first six digits character of this character string, in galois field, carry out the decoding step of Read-Solomon error correction algorithm; The version number decoding according to Read-Solomon and data requirement number are searched corresponding form, draw sign character capacity, code word data number and the error correction code word number of this version, and remove first six digits character in this character string; According to the character capacity of version number, remove the filling symbol that add at end, and residue character string is transferred to bit stream, every eight is one group, generated codeword, eight of less thaies, in end zero padding, after supplying eight, change, generated codeword, has so just obtained total streams of code words again; In galois field, with Read-Solomon algorithm, total streams of code words is decoded, output code word data stream, is converted to eight-digit binary number by each code word data, generates bit stream; Then this bit stream is passed through to the computing of contrary coding, this bit stream is reduced to former data message output, complete decoding.
2. a kind of coding method of character Quick Response Code and coding/decoding method towards note according to claim 1, it is characterized in that, described coding method adopts basic large WriteMode, described basic capitalization pattern-coding character set be capitalization A-Z, digital 0-9, nine conventional sign space:. ,/, %, _,, * and+; First described basic large WriteMode is divided into one group every two characters of data message, and is converted into 11 scale-of-two; If data message number to be encoded is not two multiple, last character after two one divisions is converted to six bits by its corresponding value so; Then binary number is connected in turn, and in binary number foremost, adds basic capitalization mode indicators 001 and character count designator; Then every eight of bit stream is divided into one group, the code word data of a byte of every group of regeneration, eight of less thaies at end, fill character zero, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.
3. a kind of coding method of character Quick Response Code and coding/decoding method towards note according to claim 1, it is characterized in that, described coding method adopts substantially little WriteMode, described basic small letter pattern-coding character set be lowercase a-z, digital 0-9, nine conventional sign space:. ,/, %, _,, * and+.
4. a kind of coding method of character Quick Response Code and coding/decoding method towards note according to claim 1, it is characterized in that, described coding method adopts digital punctuate pattern, and described digital punctuate pattern-coding character set is digital 0-9,33 conventional signs
Space:. ,/, %, _,, * ,+,! , ", #, &, '), (,, ,-; , < ,=, >,,, [, ,], ^, `, {, |, } and~.
5. a kind of coding method of character Quick Response Code and coding/decoding method towards note according to claim 1, it is characterized in that, described coding method adopts figure pattern, described figure pattern coded character set is digital 0-9, every three of data message to be encoded is divided into one group, every group of data are converted to ten bits; If data message figure place to be encoded is not three integer multiple, remaining one-bit digital is converted to tetrad, or remaining binary digit is converted to seven bits, then to all data message codings, the binary digit of formation is coupled together, form bit stream; Before bit stream, add successively again figure pattern designator and character count designator; Every eight of this bit stream is divided into one group, the code word data of a byte of every group of regeneration, eight of less thaies at end, fill character zero, be eight-digit binary number, then be converted to the code word data of a byte, finally obtain code word data stream.
6. a kind of coding method of character Quick Response Code and coding/decoding method towards note according to claim 1, it is characterized in that, described coding method adopts syntype, described syntype coded character set be capitalization A-Z, lowercase a-z, digital 0-9 and 33 conventional sign space:. ,/, %, _,, * ,+,! , ", #, &, '), (,, ,-; , < ,=, >,,, [, ,], ^, `, {, |, } and~.
CN201210014201.8A 2012-01-17 2012-01-17 Character two-dimension code encoding and decoding method for short message Expired - Fee Related CN102592160B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210014201.8A CN102592160B (en) 2012-01-17 2012-01-17 Character two-dimension code encoding and decoding method for short message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210014201.8A CN102592160B (en) 2012-01-17 2012-01-17 Character two-dimension code encoding and decoding method for short message

Publications (2)

Publication Number Publication Date
CN102592160A CN102592160A (en) 2012-07-18
CN102592160B true CN102592160B (en) 2014-08-13

Family

ID=46480770

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210014201.8A Expired - Fee Related CN102592160B (en) 2012-01-17 2012-01-17 Character two-dimension code encoding and decoding method for short message

Country Status (1)

Country Link
CN (1) CN102592160B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017072029A1 (en) 2015-10-28 2017-05-04 Koninklijke Philips N.V. Device and method for representing an anatomical shape of a living being
CN107895187A (en) * 2017-10-12 2018-04-10 中国农业大学 The generation method and device of character type Quick Response Code

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104102891A (en) * 2013-04-02 2014-10-15 腾讯科技(深圳)有限公司 Information interaction method based on two dimension code, and mobile terminal
CN104518800B (en) * 2013-09-26 2018-05-08 北大方正集团有限公司 The data compression method and apparatus of electronic supervision code
CN104143109B (en) * 2014-01-28 2017-04-05 深圳市雁联计算系统有限公司 A kind of coding and decoding methods and its printed article of Quick Response Code
CN104899612A (en) * 2015-06-26 2015-09-09 信码互通(北京)科技有限公司 Character coding method with error correction function, character decoding method with error correction function, and product
CN106454772B (en) * 2015-08-13 2019-11-26 阿里巴巴集团控股有限公司 The sending, receiving method and device of short message
CN105630755B (en) * 2016-01-22 2018-08-14 上海普适导航科技股份有限公司 Big-dipper satellite short message expands the source encoding and decoding method and device of information content transmission
CN106022431B (en) * 2016-05-18 2022-05-03 北京鼎九信息工程研究院有限公司 Method and device for generating, recognizing and reading color two-dimensional graph code of color identification type
CN108009459B (en) * 2017-11-24 2020-08-18 浙江工业大学 Character two-dimensional bar code rapid positioning method based on triangular locator
CN113765620B (en) * 2020-06-01 2022-09-23 南京大学 Block compression encoding method, block compression encoding device, computer equipment and readable storage medium
CN112199922B (en) * 2020-08-25 2023-08-22 中国物品编码中心 Encoding method, apparatus, device, and computer-readable storage medium
CN112016270B (en) * 2020-09-08 2024-04-02 中国物品编码中心 Logistics information coding method, device and equipment of Chinese-character codes
CN113610203B (en) * 2021-06-28 2024-04-19 清华大学 Bit stream coding method and device for quick response matrix code

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101859397A (en) * 2009-04-10 2010-10-13 银河联动信息技术(北京)有限公司 Two-dimensional array code
CN101431340B (en) * 2008-12-12 2011-07-20 东南大学 Fast self-adapting confidence propagation interpretation method for Reed-Solomon code

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6145110A (en) * 1998-06-22 2000-11-07 Ericsson Inc. Digital data decoder that derives codeword estimates from soft data

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101431340B (en) * 2008-12-12 2011-07-20 东南大学 Fast self-adapting confidence propagation interpretation method for Reed-Solomon code
CN101859397A (en) * 2009-04-10 2010-10-13 银河联动信息技术(北京)有限公司 Two-dimensional array code

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2017072029A1 (en) 2015-10-28 2017-05-04 Koninklijke Philips N.V. Device and method for representing an anatomical shape of a living being
CN107895187A (en) * 2017-10-12 2018-04-10 中国农业大学 The generation method and device of character type Quick Response Code

Also Published As

Publication number Publication date
CN102592160A (en) 2012-07-18

Similar Documents

Publication Publication Date Title
CN102592160B (en) Character two-dimension code encoding and decoding method for short message
CN104143109B (en) A kind of coding and decoding methods and its printed article of Quick Response Code
CN101515335A (en) Color two dimension bar code with high compression ratio Chinese character coding capability and its coding and decoding method
CN101639899B (en) Methods and devices for encoding and decoding two-dimension code and terminal
CN101645140A (en) Two-dimensional code generation method, decoding method and device
CN102999773B (en) Colorful lattice point code picture and three-dimensional bar code coding method thereof
CN103582883A (en) Improved encoding and decoding of variable-length data with group formats
CN107563475B (en) Two-dimensional code encoding method and device
CN103400173A (en) Generating method and reading method of two-dimensional code containing private information
CN104268615A (en) Encoding method and decoding method for color two-dimensional code
JP5476346B2 (en) Method for encoding and decoding data in matrix code symbols
CN101621575B (en) Embedded vector font color changing method
CN103577861B (en) Bar code structure and bar code encoding method
CN103268507A (en) Three-dimension code coding method
CN102508690B (en) Storing method and decoding method for command line of embedded equipment
CN101493901A (en) Two-dimensional code data compressing and decompressing method and terminal
CN102568608B (en) Improved method for strengthening QR (Quick Response) code error correcting capability
CN101303742B (en) Microminiature Hanxin code and method for generating symbol thereof
CN105046306A (en) Method for encoding color multi-dimensional codes containing information of variety of biological characteristics
CN101764621B (en) Method for realizing compatibility of short code and subcode in satellite-based (8176, 7156) LDPC coder
CN106330403B (en) A kind of coding and decoding method and system
CN1885725B (en) Error correction coding method
CN102468902B (en) Method for Turbo coding of rate match/de-rate match in LTE (long term evolution) system
CN100504912C (en) Two dimensional bar code symbol generation method
CN106709542A (en) Six-coding element article bar code

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20140813

Termination date: 20160117

EXPY Termination of patent right or utility model