CN103020685A - Method and system for coding and expanding two-dimensional codes - Google Patents

Method and system for coding and expanding two-dimensional codes Download PDF

Info

Publication number
CN103020685A
CN103020685A CN2012105436554A CN201210543655A CN103020685A CN 103020685 A CN103020685 A CN 103020685A CN 2012105436554 A CN2012105436554 A CN 2012105436554A CN 201210543655 A CN201210543655 A CN 201210543655A CN 103020685 A CN103020685 A CN 103020685A
Authority
CN
China
Prior art keywords
character
quick response
strategic server
color value
color
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012105436554A
Other languages
Chinese (zh)
Other versions
CN103020685B (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.)
Suzhou Codyy Network Technology Co Ltd
Original Assignee
Suzhou Codyy Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Codyy Network Technology Co Ltd filed Critical Suzhou Codyy Network Technology Co Ltd
Priority to CN201210543655.4A priority Critical patent/CN103020685B/en
Publication of CN103020685A publication Critical patent/CN103020685A/en
Application granted granted Critical
Publication of CN103020685B publication Critical patent/CN103020685B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a method and a system for coding and expanding two-dimensional codes. The method includes the steps: converting characters into a byte array corresponding to utf-8 codes of the characters and transmitting the byte array to a policy server by a two-dimensional code generator; determining color values corresponding to the characters according to a first preset policy and informing the two-dimensional code generator by the policy server; and drawing the color values in a two-dimensional code data area by the two-dimensional code generator to form a two-dimensional code picture. A decoder reads and analyzes the two-dimensional code picture to be processed, obtains the color value of the two-dimensional code picture to be processed and transmits the color value to the policy server, and the policy server inquires a color interval table, obtains the corresponding characters and transmits the corresponding characters to the decoder. The policy server is used for determining the color interval table according to a second preset policy according to the color values corresponding to the characters.

Description

A kind of Quick Response Code coding extending method and system
Technical field
The invention belongs to the instant messaging field, relate in particular to a kind of Quick Response Code coding extending method and system.
Background technology
Along with social develop rapidly, science and technology is applied in people's life more and more.At present, in the process of circulation of extensive stock, for increasing information capacity, on many commodity, can identify Quick Response Code, than bar code before, Quick Response Code can hold more Word message.Quick Response Code is mainly the combination of black and white color lump at present, and the character capacity that can store is less, greatly reduces the Quick Response Code actual application value.
Summary of the invention
The invention provides a kind of Quick Response Code coding extending method and system to address the above problem.
The invention provides a kind of Quick Response Code coding extending method, comprise the following steps.The Quick Response Code maker becomes encode corresponding byte array send to strategic server of the utf-8 of character by character conversion, described strategic server is determined the color value that character is corresponding and is notified described Quick Response Code maker according to the first preset strategy, described Quick Response Code maker is plotted in the Quick Response Code data area by described color value, forms two-dimension code image.Demoder reads and resolves pending two-dimension code image, obtains described pending two-dimension code image color value and sends to described strategic server, and described strategic server inquiry color interval table, obtain corresponding character and send to demoder.Wherein, the color value that described strategic server is corresponding according to character, according to the second preset strategy, determine the color interval table.
The invention provides a kind of Quick Response Code coding expanding system, comprise Quick Response Code maker, strategic server and demoder, described Quick Response Code maker connects described strategic server, and described strategic server connects described demoder.Described Quick Response Code maker, for encode corresponding byte array send to strategic server of the utf-8 that character conversion is become to character, also be plotted in the Quick Response Code data area for the notice according to strategic server by color value, forms two-dimension code image.Described strategic server, for determining the color value that character is corresponding and notify described Quick Response Code maker according to the first preset strategy; Also, for the color value corresponding according to character, according to the second preset strategy, determine the color interval table.Described demoder, for reading and resolve pending two-dimension code image, obtain described pending two-dimension code image color value and send to described strategic server.Described strategic server, for the described pending two-dimension code image color value sent according to described demoder, inquiry color interval table, obtain corresponding character and send to demoder.
Compared to prior art, according to Quick Response Code coding extending method provided by the invention and system, the Quick Response Code maker becomes encode corresponding byte array send to strategic server of the utf-8 of character by character conversion, described strategic server is determined the color value that character is corresponding and is notified described Quick Response Code maker according to the first preset strategy, described Quick Response Code maker is plotted in the Quick Response Code data area by described color value, forms two-dimension code image.The two-dimension code image that multiple color forms has been expanded the Quick Response Code capacity greatly.Demoder reads and resolves pending two-dimension code image, obtains described pending two-dimension code image color value and sends to described strategic server, and described strategic server inquiry color interval table, obtain corresponding character and send to demoder.Wherein, the color value that described strategic server is corresponding according to character, according to the second preset strategy, determine the color interval table.So, effectively expand the 2 D code information amount, improved actual application value.
The accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, forms the application's a part, and schematic description and description of the present invention the present invention does not form inappropriate limitation of the present invention for explaining.In the accompanying drawings:
Figure 1 shows that the process flow diagram of the Quick Response Code coding extending method that preferred embodiment according to the present invention provides,
Figure 2 shows that the schematic diagram of the Quick Response Code coding expanding system that preferred embodiment according to the present invention provides.
Embodiment
Hereinafter with reference to accompanying drawing, also describe the present invention in detail in conjunction with the embodiments.It should be noted that, in the situation that do not conflict, embodiment and the feature in embodiment in the application can combine mutually.
Figure 1 shows that the process flow diagram of the Quick Response Code coding extending method that preferred embodiment according to the present invention provides.As shown in Figure 1, the Quick Response Code coding extending method that preferred embodiment of the present invention provides comprises step 101 ~ 102.
Step 101: the Quick Response Code maker becomes encode corresponding byte array send to strategic server of the utf-8 of character by character conversion, described strategic server is determined the color value that character is corresponding and is notified described Quick Response Code maker according to the first preset strategy, described Quick Response Code maker is plotted in the Quick Response Code data area by described color value, forms two-dimension code image.
Particularly, the computing machine bottom has character and unique utf-8 coding corresponding to described character, and wherein the utf-8 of each character corresponding byte array length of encoding is 3, and the value of bits per inch value is between 1 ~ 255.Take partial character as example, and the utf-8 of described computing machine bottom character and character encodes corresponding byte array form for example shown in table 1.
Character The utf-8 of the character corresponding byte array of encoding
You 230,130,168
Good 229,165,189
Not 230,156,170
Fly 233,163,158
Table 1
The utf-8 of described character corresponding 3 the byte array values of encoding correspond respectively to R, G and the B value of color.In this, described the first preset strategy is that if the utf-8 of single character encodes corresponding byte array, three numerical value are a, b and c, wherein, described a, b and c be R, G and the B value of corresponding color respectively, color value=65536*R+256*G+B that described character is corresponding=65536*a+256*b+c.After described strategic server calculates the color value that described character is corresponding and notifies the Quick Response Code maker, described Quick Response Code maker is converted to sexadecimal by described color value by the decimal system, and color is plotted in to Quick Response Code data area formation two-dimension code image.
Step 102: demoder reads and resolves pending two-dimension code image, obtain described pending two-dimension code image color value and send to described strategic server, described strategic server inquiry color interval table, obtain corresponding character and send to demoder, wherein, the color value that described strategic server is corresponding according to character, according to the second preset strategy, determine the color interval table.
Particularly, described the second preset strategy is, if the color value that single character is corresponding is Sn, the color value of Sn interval is Sn-(Sn-S (n-1))/2 to Sn+ (S (n+1)-Sn)/2, n gets 1 o'clock, corresponding color value interval is 0 to s1+ (s2-s1)/2, and when n gets maximal value, corresponding color value interval is that Sn-(Sn-S (n-1))/2 is to 255*255*255=16581375.Wherein, the maximal value that described n is corresponding is all character sums in character repertoire, if Chinese characters in common use and other character add up to 6000, the maximal value of n is 6000.Described strategic server storage color interval table, described color interval table comprises character and color value interval corresponding to described character.
For example, if the Quick Response Code maker need be in two-dimension code image canned data comprise a word used for translation, eh, Sha and A Si character, described four character utf-8 corresponding byte array of encoding is respectively a word used for translation (229,144,150), (229,149,138), Sha (229,151,132) and Ah (233,152,191), the Quick Response Code maker sends to respectively strategic server by the described character utf-8 corresponding byte array of encoding.If described four color values corresponding to character are respectively S1, S2, S3 and S4, strategic server calculates S1=65536*229+256*144+150=15044758 according to the first preset strategy, S2=65536*229+256*149+138=15046026, S3=65536*229+256*151+132=15046532, S4=65536*233+256*152+191=15308991, and send to the Quick Response Code maker.Described Quick Response Code maker is plotted in respectively the Quick Response Code data area by corresponding color after described S1 ~ S4 is converted to respectively to sexadecimal numerical value, forms two-dimension code image.In the present embodiment, described two-dimension code image also comprises other character and corresponding color, and for ease of explanation, above-mentioned four characters of only take are example.
Described strategic server storage color interval table, in the present embodiment, strategic server is determined corresponding " a word used for translation " character of S1(according to the second preset strategy) the color value interval be 0 to 15044758+(15046026-15044758)/2,0 to 15045391.Calculate respectively S2(correspondence " " character) the color value interval be 15045392 to 15046278, S3(corresponding " Sha " characters) the color value interval be 15046279 to 15177761.In this, if S5 is 15508991, S4(corresponding " Ah "'s character) the color value interval be 15177762 to S4+(S5-S4)/2,15177762 to 15408991.Described color interval table comprises all characters of character repertoire and corresponding color value interval, and four characters of the present embodiment of take are example, and between described chromatic zones, the sheet format example is as shown in table 2.
Character Corresponding color value interval
A word used for translation 0~15045391(15044758)
? 15045392~15046278(15046026)
Sha 15046279~15177761(15046532)
Ah 15177762~15408991(15308991)
Table 2
If demoder reads and resolve a certain color in described two-dimension code image corresponding data zone, after obtaining the hexadecimal code of described color, convert decimal system color value to and be 15044900 and send to strategic server.The color interval table of described strategic server inquiry self storage, determine that described color value 15044900 is in interval 0 ~ 15045391, corresponding " a word used for translation " character, and to obtain this character be a word used for translation to strategic server, and send to demoder.Similarly, strategic server can obtain successively other character and send to demoder, and detailed process repeats no more.
Figure 2 shows that the schematic diagram of the Quick Response Code coding expanding system that preferred embodiment according to the present invention provides.As shown in Figure 2, the Quick Response Code coding expanding system that preferred embodiment of the present invention provides comprises Quick Response Code maker 201, strategic server 202 and demoder 203, described Quick Response Code maker 201 connects described strategic server 202, and described strategic server 202 connects described demoder 203.Described Quick Response Code maker 201, for character conversion being become to encode corresponding byte array send to strategic server 202 of the utf-8 of character, also for the notice according to strategic server 202, color value is plotted in to the Quick Response Code data area, forms two-dimension code image.Described strategic server 202, for determining the color value that character is corresponding and notify described Quick Response Code maker 201 according to the first preset strategy; Also, for the color value corresponding according to character, according to the second preset strategy, determine the color interval table.Described demoder 203, for reading and resolve pending two-dimension code image, obtain described pending two-dimension code image color value and send to described strategic server 202.Described strategic server 202, for the described pending two-dimension code image color value sent according to described demoder 203, inquiry color interval table, obtain corresponding character and send to demoder 203.Operating process about said system is described with above-mentioned method, therefore repeat no more in this.
In sum, Quick Response Code coding extending method and system that according to the present invention, preferred embodiment provides, the Quick Response Code maker becomes encode corresponding byte array send to strategic server of the utf-8 of character by character conversion, described strategic server is determined the color value that character is corresponding and is notified described Quick Response Code maker according to the first preset strategy, described Quick Response Code maker is plotted in the Quick Response Code data area by described color value, forms two-dimension code image.The two-dimension code image that multiple color forms has been expanded the Quick Response Code capacity greatly.Demoder reads and resolves pending two-dimension code image, obtains described pending two-dimension code image color value and sends to described strategic server, and described strategic server inquiry color interval table, obtain corresponding character and send to demoder.Wherein, the color value that described strategic server is corresponding according to character, according to the second preset strategy, determine the color interval table.So, effectively expand the 2 D code information amount, improved actual application value.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (5)

1. a Quick Response Code coding extending method, is characterized in that, comprises the following steps:
The Quick Response Code maker becomes encode corresponding byte array send to strategic server of the utf-8 of character by character conversion, described strategic server is determined the color value that character is corresponding and is notified described Quick Response Code maker according to the first preset strategy, described Quick Response Code maker is plotted in the Quick Response Code data area by described color value, forms two-dimension code image;
Demoder reads and resolves pending two-dimension code image, obtains described pending two-dimension code image color value and sends to described strategic server, and described strategic server inquiry color interval table, obtain corresponding character and send to demoder,
Wherein, the color value that described strategic server is corresponding according to character, according to the second preset strategy, determine the color interval table.
2. method according to claim 1, it is characterized in that, described the first preset strategy is, if the utf-8 of single character encodes corresponding byte array, three numerical value are a, b and c, wherein, described a, b and c be R, G and the B value of corresponding color respectively, color value=65536*R+256*G+B that described character is corresponding=65536*a+256*b+c.
3. method according to claim 1, is characterized in that, described strategic server storage color interval table, and described color interval table comprises character and color value interval corresponding to described character.
4. method according to claim 1, it is characterized in that, described the second preset strategy is, if the color value that single character is corresponding is Sn, the color value of Sn interval is Sn-(Sn-S (n-1))/2 to Sn+ (S (n+1)-Sn)/2, wherein n gets 1 o'clock, corresponding color value interval is 0 to s1+ (s2-s1)/2, when n gets maximal value, corresponding color value interval is that Sn-(Sn-S (n-1))/2 is to 255*255*255=16581375, wherein, described maximal value refers to all character sums in character repertoire.
5. a Quick Response Code coding expanding system, is characterized in that, comprise Quick Response Code maker, strategic server and demoder, described Quick Response Code maker connects described strategic server, and described strategic server connects described demoder,
Described Quick Response Code maker, for encode corresponding byte array send to strategic server of the utf-8 that character conversion is become to character, also be plotted in the Quick Response Code data area for the notice according to strategic server by color value, forms two-dimension code image;
Described strategic server, for determining the color value that character is corresponding and notify described Quick Response Code maker according to the first preset strategy; Also, for the color value corresponding according to character, according to the second preset strategy, determine the color interval table;
Described demoder, for reading and resolve pending two-dimension code image, obtain described pending two-dimension code image color value and send to described strategic server;
Described strategic server, for the described pending two-dimension code image color value sent according to described demoder, inquiry color interval table, obtain corresponding character and send to demoder.
CN201210543655.4A 2012-12-14 2012-12-14 A kind of Quick Response Code coding extending method and system Expired - Fee Related CN103020685B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210543655.4A CN103020685B (en) 2012-12-14 2012-12-14 A kind of Quick Response Code coding extending method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210543655.4A CN103020685B (en) 2012-12-14 2012-12-14 A kind of Quick Response Code coding extending method and system

Publications (2)

Publication Number Publication Date
CN103020685A true CN103020685A (en) 2013-04-03
CN103020685B CN103020685B (en) 2015-11-04

Family

ID=47969273

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210543655.4A Expired - Fee Related CN103020685B (en) 2012-12-14 2012-12-14 A kind of Quick Response Code coding extending method and system

Country Status (1)

Country Link
CN (1) CN103020685B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203571A (en) * 2016-07-11 2016-12-07 搜油郎成都科技有限公司 Image production method based on Quick Response Code and recognition methods and realize system
CN112418373A (en) * 2020-09-29 2021-02-26 武汉格事化信息技术有限公司 Internet of things dynamic two-dimensional code generation method, storage medium and system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101714257A (en) * 2009-12-23 2010-05-26 公安部第三研究所 Method for main color feature extraction and structuring description of images
CN102004935A (en) * 2010-11-08 2011-04-06 佟野 LDPC (Low Density Parity Code)-based method for encoding and decoding two dimensional bar codes
CN102184380A (en) * 2011-05-10 2011-09-14 华南农业大学 Color-superposition two-dimension code system and application method thereof
US20120031973A1 (en) * 2009-04-10 2012-02-09 Beijing Sigone Venture Limited Two-dimensional array code

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20120031973A1 (en) * 2009-04-10 2012-02-09 Beijing Sigone Venture Limited Two-dimensional array code
CN101714257A (en) * 2009-12-23 2010-05-26 公安部第三研究所 Method for main color feature extraction and structuring description of images
CN102004935A (en) * 2010-11-08 2011-04-06 佟野 LDPC (Low Density Parity Code)-based method for encoding and decoding two dimensional bar codes
CN102184380A (en) * 2011-05-10 2011-09-14 华南农业大学 Color-superposition two-dimension code system and application method thereof

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106203571A (en) * 2016-07-11 2016-12-07 搜油郎成都科技有限公司 Image production method based on Quick Response Code and recognition methods and realize system
CN112418373A (en) * 2020-09-29 2021-02-26 武汉格事化信息技术有限公司 Internet of things dynamic two-dimensional code generation method, storage medium and system

Also Published As

Publication number Publication date
CN103020685B (en) 2015-11-04

Similar Documents

Publication Publication Date Title
CN103400174B (en) The coded method of a kind of Quick Response Code, coding/decoding method and system
CN101222476B (en) Expandable markup language file editor, file transferring method and system
AU2017342863B2 (en) Methods and devices for encoding and decoding binary data
CN102571966A (en) Network transmission method for large extensible markup language (XML) document
CN106919882A (en) A kind of method that two-dimentional digital content switchs to pure digi-tal symbolic coding
CN103020686A (en) Method and system for coding two-dimensional code colors
CN102339277A (en) Method and system for converting text content into picture content
CN103065177A (en) Coding method and system of two-dimension code
CN114286102A (en) Binary image compression coding and decoding method based on Base62 coding
CN103020685A (en) Method and system for coding and expanding two-dimensional codes
JP2012160161A (en) Method of encoding and decoding data to/from matrix code symbol
JP5551660B2 (en) Computer-implemented method for encoding text into matrix code symbols, computer-implemented method for decoding matrix code symbols, encoder for encoding text into matrix code symbols, and decoder for decoding matrix code symbols
WO2013073624A1 (en) Feature amount encoding device, feature amount encoding method, and program
CN102982046B (en) A kind of web data compression and storage method and system
CN103034835A (en) Two-dimensional code processing method and two-dimensional code client-side
CN104408503B (en) The processing method and system of Quick Response Code
CN105468712A (en) Data storage compatibility method
US20200321079A1 (en) Encoding/decoding method, encoder/decoder, storage method and device
CN109819254B (en) Lossy image compression transmission method and system
CN111708574A (en) Instruction stream compression and decompression method and device
CN103178968A (en) Encryption method of data transmission threshold scheme based on Huffman compression
CN103116654B (en) A kind of XML data node code compression method
WO2015196717A1 (en) Image decoding method and apparatus
US8433146B2 (en) Method for encoding image using color space estimation
JP2007300165A (en) Image processing apparatus and image processing 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
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: Suzhou City, Jiangsu province 215121 Fengting Avenue Suzhou Industrial Park No. 666 Weiting Intelligent Industrial Park Building 8

Applicant after: Kuo Di education and science company limited

Address before: Suzhou City, Jiangsu province 215121 Fengting Avenue Suzhou Industrial Park No. 666 Weiting Intelligent Industrial Park Building 8

Applicant before: Suzhou Kuodi Network Technology Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: SUZHOU KUODI NETWORK TECHNOLOGY CO., LTD. TO: CODYY EDUCATION TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20151104

Termination date: 20191214